summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java26
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCheckBox.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDateField.java11
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VSlider.java29
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTextualDate.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VUI.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VWindow.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java5
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java1
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/slider/SliderConnector.java1
-rw-r--r--client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java2
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java5
-rw-r--r--client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java4
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractFieldConnector.java16
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractLegacyComponentConnector.java8
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCheckBox.java109
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java20
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/checkbox/CheckBoxConnector.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/AbstractColorPickerConnector.java4
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGradientConnector.java6
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java4
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/label/LabelConnector.java4
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java6
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java11
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractLegacyComponent.java121
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java22
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java160
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java3
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java3
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java109
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java1
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java224
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentTest.java (renamed from server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentTest.java)8
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractFieldState.java9
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractLegacyComponentState.java32
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java4
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGradientState.java4
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGridState.java4
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerState.java4
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/label/LabelState.java4
-rw-r--r--compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/upload/UploadState.java4
-rw-r--r--server/src/main/java/com/vaadin/server/DragAndDropService.java18
-rw-r--r--server/src/main/java/com/vaadin/server/VariableOwner.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractColorPicker.java9
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractComponent.java54
-rw-r--r--server/src/main/java/com/vaadin/ui/Component.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/TabSheet.java1
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java43
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java15
-rw-r--r--shared/src/main/java/com/vaadin/shared/AbstractComponentState.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestDateField.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForWindowing.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java80
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java59
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.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/button/ButtonMouseDetails.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java58
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java1
-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/LowResolution.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/Footer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java101
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java97
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/TogglePush.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java1
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java1
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java1
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java52
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java48
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java53
150 files changed, 804 insertions, 1233 deletions
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 ce07fc0baf..250d9c53fa 100644
--- a/client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java
+++ b/client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java
@@ -103,12 +103,6 @@ public class ServerRpcQueue {
*
* @param invocation
* RPC method invocation
- * @param delayed
- * <code>false</code> to trigger sending within a short time
- * window (possibly combining subsequent calls to a single
- * request), <code>true</code> to let the framework delay sending
- * of RPC calls and variable changes until the next non-delayed
- * change
* @param lastOnly
* <code>true</code> to remove all previously delayed invocations
* of the same method that were also enqueued with lastonly set
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 837b185f35..5f75869ba4 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java
@@ -96,9 +96,6 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/** For internal use only. May be removed or replaced in the future. */
public ApplicationConnection client;
- /** For internal use only. May be removed or replaced in the future. */
- public boolean immediate;
-
/**
* The current position of the split handle in either percentages or pixels
* <p>
@@ -406,8 +403,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
int pixelPosition = DOM.getElementPropertyInt(splitter, "offsetTop");
// reposition splitter in case it is out of box
- if ((pixelPosition > 0 && pixelPosition + getSplitterSize() > wholeSize)
- || (positionReversed && pixelPosition < 0)) {
+ if (pixelPosition > 0 && pixelPosition + getSplitterSize() > wholeSize
+ || positionReversed && pixelPosition < 0) {
pixelPosition = wholeSize - getSplitterSize();
if (pixelPosition < 0) {
pixelPosition = 0;
@@ -418,8 +415,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;
}
@@ -456,8 +453,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
int pixelPosition = DOM.getElementPropertyInt(splitter, "offsetLeft");
// reposition splitter in case it is out of box
- if ((pixelPosition > 0 && pixelPosition + getSplitterSize() > wholeSize)
- || (positionReversed && pixelPosition < 0)) {
+ if (pixelPosition > 0 && pixelPosition + getSplitterSize() > wholeSize
+ || positionReversed && pixelPosition < 0) {
pixelPosition = wholeSize - getSplitterSize();
if (pixelPosition < 0) {
pixelPosition = 0;
@@ -468,8 +465,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;
}
@@ -667,7 +664,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
} else {
// Reversed position
if (positionReversed) {
- position = (getOffsetWidth() - newX - getSplitterSize()) + "px";
+ position = getOffsetWidth() - newX - getSplitterSize() + "px";
} else {
position = newX + "px";
}
@@ -700,8 +697,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
} else {
// Reversed position
if (positionReversed) {
- position = (getOffsetHeight() - newY - getSplitterSize())
- + "px";
+ position = getOffsetHeight() - newY - getSplitterSize() + "px";
} else {
position = newY + "px";
}
@@ -789,7 +785,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
* @return true if the browser requires a dragging curtain
*/
private boolean isDraggingCurtainRequired() {
- return (BrowserInfo.get().isGecko() || BrowserInfo.get().isWebkit());
+ return BrowserInfo.get().isGecko() || BrowserInfo.get().isWebkit();
}
/**
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 7f066e2a93..02dcfd7271 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCheckBox.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCheckBox.java
@@ -38,9 +38,6 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox
public String id;
/** For internal use only. May be removed or replaced in the future. */
- public boolean immediate;
-
- /** For internal use only. May be removed or replaced in the future. */
public ApplicationConnection client;
/** For internal use only. May be removed or replaced in the future. */
@@ -54,8 +51,7 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox
Element el = DOM.getFirstChild(getElement());
while (el != null) {
- DOM.sinkEvents(el,
- (DOM.getEventsSunk(el) | VTooltip.TOOLTIP_EVENTS));
+ DOM.sinkEvents(el, DOM.getEventsSunk(el) | VTooltip.TOOLTIP_EVENTS);
el = DOM.getNextSibling(el);
}
@@ -73,8 +69,8 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox
@Override
public void onBrowserEvent(Event event) {
- if (icon != null && (event.getTypeInt() == Event.ONCLICK)
- && (DOM.eventGetTarget(event) == icon.getElement())) {
+ if (icon != null && event.getTypeInt() == Event.ONCLICK
+ && DOM.eventGetTarget(event) == icon.getElement()) {
// Click on icon should do nothing if widget is disabled
if (isEnabled()) {
setValue(!getValue());
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 ef7a131a77..2f8c72081e 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDateField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDateField.java
@@ -35,9 +35,6 @@ public class VDateField extends FlowPanel implements Field, HasEnabled {
public ApplicationConnection client;
/** For internal use only. May be removed or replaced in the future. */
- public boolean immediate;
-
- /** For internal use only. May be removed or replaced in the future. */
public static String resolutionToString(Resolution res) {
if (res == Resolution.DAY) {
return "day";
@@ -113,14 +110,6 @@ public class VDateField extends FlowPanel implements Field, HasEnabled {
this.date = date;
}
- public boolean isImmediate() {
- return immediate;
- }
-
- public void setImmediate(boolean immediate) {
- this.immediate = immediate;
- }
-
public boolean isReadonly() {
return readonly;
}
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 d09de9a771..18d896e487 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java
@@ -86,9 +86,7 @@ public class VDateFieldCalendar extends VDateField {
false);
}
}
- if (isImmediate()) {
- getClient().sendPendingVariableChanges();
- }
+ getClient().sendPendingVariableChanges();
}
}
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 920ffec832..bc0f539657 100644
--- a/client/src/main/java/com/vaadin/client/ui/VSlider.java
+++ b/client/src/main/java/com/vaadin/client/ui/VSlider.java
@@ -52,7 +52,6 @@ public class VSlider extends SimpleFocusablePanel
protected String id;
- protected boolean immediate;
protected boolean disabled;
protected boolean readonly;
@@ -214,7 +213,7 @@ public class VSlider extends SimpleFocusablePanel
@Override
public void execute() {
final Element p = getElement();
- if (p.getPropertyInt(domProperty) > (MIN_SIZE + 5)
+ if (p.getPropertyInt(domProperty) > MIN_SIZE + 5
|| propertyNotNullOrEmpty(styleAttribute, p)) {
if (isVertical()) {
setHeight();
@@ -283,10 +282,10 @@ public class VSlider extends SimpleFocusablePanel
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())) {
@@ -406,10 +405,10 @@ public class VSlider extends SimpleFocusablePanel
}
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))
+ v = (coord - baseOffset) / (double) (baseSize - handleSize)
* (max - min) + min;
}
@@ -475,8 +474,8 @@ public class VSlider extends SimpleFocusablePanel
return false;
}
- if ((keycode == getNavigationUpKey() && isVertical())
- || (keycode == getNavigationRightKey() && !isVertical())) {
+ if (keycode == getNavigationUpKey() && isVertical()
+ || keycode == getNavigationRightKey() && !isVertical()) {
if (shift) {
for (int a = 0; a < acceleration; a++) {
increaseValue(false);
@@ -487,7 +486,7 @@ public class VSlider extends SimpleFocusablePanel
}
return true;
} else if (keycode == getNavigationDownKey() && isVertical()
- || (keycode == getNavigationLeftKey() && !isVertical())) {
+ || keycode == getNavigationLeftKey() && !isVertical()) {
if (shift) {
for (int a = 0; a < acceleration; a++) {
decreaseValue(false);
@@ -554,10 +553,6 @@ public class VSlider extends SimpleFocusablePanel
this.id = id;
}
- public void setImmediate(boolean immediate) {
- this.immediate = immediate;
- }
-
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
@@ -614,7 +609,7 @@ public class VSlider extends SimpleFocusablePanel
: "offsetWidth";
final int handleSize = handle.getPropertyInt(domProperty);
final int baseSize = base.getPropertyInt(domProperty)
- - (2 * BASE_BORDER_WIDTH);
+ - 2 * BASE_BORDER_WIDTH;
final int range = baseSize - handleSize;
double v = value.doubleValue();
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 9577698194..7b83a5622d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTextualDate.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTextualDate.java
@@ -258,16 +258,16 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
Date currentDate = getDate();
getClient().updateVariable(getId(), "year",
currentDate != null ? currentDate.getYear() + 1900 : -1,
- currentResolution == Resolution.YEAR && immediate);
+ currentResolution == Resolution.YEAR);
if (currentResolution.compareTo(Resolution.MONTH) <= 0) {
getClient().updateVariable(getId(), "month",
currentDate != null ? currentDate.getMonth() + 1 : -1,
- currentResolution == Resolution.MONTH && immediate);
+ currentResolution == Resolution.MONTH);
}
if (currentResolution.compareTo(Resolution.DAY) <= 0) {
getClient().updateVariable(getId(), "day",
currentDate != null ? currentDate.getDate() : -1,
- currentResolution == Resolution.DAY && immediate);
+ currentResolution == Resolution.DAY);
}
}
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 585631a6b6..ad4077d396 100644
--- a/client/src/main/java/com/vaadin/client/ui/VUI.java
+++ b/client/src/main/java/com/vaadin/client/ui/VUI.java
@@ -97,9 +97,6 @@ public class VUI extends SimplePanel implements ResizeHandler,
private int parentHeight;
/** For internal use only. May be removed or replaced in the future. */
- public boolean immediate;
-
- /** For internal use only. May be removed or replaced in the future. */
public boolean resizeLazy = false;
private HandlerRegistration historyHandlerRegistration;
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 e9767a6bac..8f1292ca1d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VWindow.java
+++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java
@@ -188,9 +188,6 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
*/
public boolean centered = false;
- /** For internal use only. May be removed or replaced in the future. */
- public boolean immediate;
-
private Element wrapper;
/** For internal use only. May be removed or replaced in the future. */
@@ -548,7 +545,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
private static void focusTopmostModalWindow() {
VWindow topmost = getTopmostWindow();
- if ((topmost != null) && (topmost.vaadinModality)) {
+ if (topmost != null && topmost.vaadinModality) {
topmost.focus();
}
}
@@ -1109,7 +1106,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
if (updateVariables) {
// sending width back always as pixels, no need for unit
client.updateVariable(id, "width", w, false);
- client.updateVariable(id, "height", h, immediate);
+ client.updateVariable(id, "height", h, true);
}
if (updateVariables || !resizeLazy) {
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 3c36ffd4fe..cf39e5ee21 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
@@ -109,7 +109,6 @@ public class CheckBoxConnector extends AbstractFieldConnector
VCaption.setCaptionText(getWidget(), getState());
getWidget().setValue(getState().checked);
- getWidget().immediate = getState().immediate;
}
@Override
@@ -140,9 +139,7 @@ public class CheckBoxConnector extends AbstractFieldConnector
getWidget().getElement());
getRpcProxy(CheckBoxServerRpc.class).setChecked(getState().checked,
details);
- if (getState().immediate) {
- getConnection().sendPendingVariableChanges();
- }
+ getConnection().sendPendingVariableChanges();
}
}
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 9d9bdb4d7a..5e0fe7cc2e 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
@@ -38,7 +38,6 @@ public class AbstractDateFieldConnector extends AbstractFieldConnector
// Save details
getWidget().client = client;
getWidget().paintableId = uidl.getId();
- getWidget().immediate = getState().immediate;
getWidget().setReadonly(isReadOnly());
getWidget().setEnabled(isEnabled());
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 c5972c9f61..7161283176 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
@@ -56,9 +56,7 @@ public class DateFieldConnector extends TextualDateConnector {
* a day/enter/clicking outside of popup) then the new value is
* communicated to the server.
*/
- if (getWidget().isImmediate()) {
- getConnection().getServerRpcQueue().flush();
- }
+ getConnection().getServerRpcQueue().flush();
}
});
}
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 7988847995..a77870ec2f 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
@@ -81,7 +81,6 @@ public class SliderConnector extends AbstractFieldConnector
super.onStateChanged(stateChangeEvent);
getWidget().setId(getConnectorId());
- getWidget().setImmediate(getState().immediate);
getWidget().setDisabled(!isEnabled());
getWidget().setReadOnly(isReadOnly());
getWidget().setOrientation(getState().orientation);
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 ec6b86880b..86cf5adf98 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
@@ -124,8 +124,6 @@ public abstract class AbstractSplitPanelConnector extends
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
- getWidget().immediate = getState().immediate;
-
getWidget().setEnabled(isEnabled());
clickEventHandler.handleEventHandlerRegistration();
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 26f99bfb94..3770c28446 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
@@ -175,9 +175,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
getRpcProxy(UIServerRpc.class).resize(event.getHeight(),
event.getWidth(), Window.getClientWidth(),
Window.getClientHeight());
- if (getState().immediate || getPageState().hasResizeListeners) {
- getConnection().getServerRpcQueue().flush();
- }
+ getConnection().getServerRpcQueue().flush();
}
});
getWidget().addScrollHandler(new ScrollHandler() {
@@ -211,7 +209,6 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
boolean firstPaint = getWidget().connection == null;
getWidget().connection = client;
- getWidget().immediate = getState().immediate;
getWidget().resizeLazy = uidl.hasAttribute(UIConstants.RESIZE_LAZY);
// this also implicitly removes old styles
String styles = "";
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 7d9094e583..eed89f090c 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
@@ -218,7 +218,7 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
}
ComponentConnector content = getContent();
- boolean hasContent = (content != null);
+ boolean hasContent = content != null;
Element contentElement = window.contentPanel.getElement();
Style contentStyle = window.contents.getStyle();
@@ -388,8 +388,6 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
clickEventHandler.handleEventHandlerRegistration();
- window.immediate = state.immediate;
-
window.setClosable(!isReadOnly());
// initialize position from state
updateWindowPosition();
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractFieldConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractFieldConnector.java
index 36d8f17d00..7f96e63d0a 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractFieldConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractFieldConnector.java
@@ -15,14 +15,16 @@
*/
package com.vaadin.v7.client.ui;
+import com.google.gwt.user.client.ui.Focusable;
import com.vaadin.client.StyleConstants;
-import com.vaadin.client.ui.AbstractComponentConnector;
+import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.ui.HasErrorIndicator;
import com.vaadin.client.ui.HasRequiredIndicator;
import com.vaadin.v7.shared.AbstractFieldState;
@Deprecated
-public abstract class AbstractFieldConnector extends AbstractComponentConnector
+public abstract class AbstractFieldConnector
+ extends AbstractLegacyComponentConnector
implements HasRequiredIndicator, HasErrorIndicator {
@Override
@@ -71,4 +73,14 @@ public abstract class AbstractFieldConnector extends AbstractComponentConnector
getWidget().setStyleName(StyleConstants.REQUIRED,
isRequiredIndicatorVisible());
}
+
+ @OnStateChange("tabIndex")
+ void updateTabIndex() {
+ // AbstractFieldState is not inheriting TabIndexState because of
+ // AbstractLegacyComponentState, thus need to set tab index here
+ // (instead of AbstractComponentConnector)
+ if (getWidget() instanceof Focusable) {
+ ((Focusable) getWidget()).setTabIndex(getState().tabIndex);
+ }
+ }
}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractLegacyComponentConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractLegacyComponentConnector.java
index a9fe473ad4..5e27f26282 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractLegacyComponentConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/AbstractLegacyComponentConnector.java
@@ -18,6 +18,7 @@ package com.vaadin.v7.client.ui;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.AbstractConnector;
import com.vaadin.shared.communication.ServerRpc;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* Legacy connector for Vaadin 7 compatibility connectors. Needed because
@@ -26,7 +27,9 @@ import com.vaadin.shared.communication.ServerRpc;
*
* @author Vaadin Ltd
* @since 8.0
+ * @deprecated only used for Vaadin 7 compatiblity components
*/
+@Deprecated
public class AbstractLegacyComponentConnector
extends AbstractComponentConnector {
@@ -36,4 +39,9 @@ public class AbstractLegacyComponentConnector
protected <T extends ServerRpc> T getRpcProxy(Class<T> rpcInterface) {
return super.getRpcProxy(rpcInterface);
}
+
+ @Override
+ public AbstractLegacyComponentState getState() {
+ return (AbstractLegacyComponentState) super.getState();
+ }
}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCheckBox.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCheckBox.java
new file mode 100644
index 0000000000..60a0d06821
--- /dev/null
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCheckBox.java
@@ -0,0 +1,109 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.v7.client.ui;
+
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Event;
+import com.vaadin.client.ApplicationConnection;
+import com.vaadin.client.BrowserInfo;
+import com.vaadin.client.Util;
+import com.vaadin.client.VTooltip;
+import com.vaadin.client.ui.Field;
+import com.vaadin.client.ui.Icon;
+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 static final String CLASSNAME = "v-checkbox";
+
+ /** For internal use only. May be removed or replaced in the future. */
+ public String id;
+
+ /** For internal use only. May be removed or replaced in the future. */
+ public boolean immediate;
+
+ /** For internal use only. May be removed or replaced in the future. */
+ public ApplicationConnection client;
+
+ /** For internal use only. May be removed or replaced in the future. */
+ public Element errorIndicatorElement;
+
+ /** For internal use only. May be removed or replaced in the future. */
+ public Icon icon;
+
+ public VCheckBox() {
+ setStyleName(CLASSNAME);
+
+ Element el = DOM.getFirstChild(getElement());
+ while (el != null) {
+ DOM.sinkEvents(el, DOM.getEventsSunk(el) | VTooltip.TOOLTIP_EVENTS);
+ el = DOM.getNextSibling(el);
+ }
+
+ if (BrowserInfo.get().isWebkit()) {
+ // Webkit does not focus non-text input elements on click
+ // (#11854)
+ addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ setFocus(true);
+ }
+ });
+ }
+ }
+
+ @Override
+ public void onBrowserEvent(Event event) {
+ if (icon != null && event.getTypeInt() == Event.ONCLICK
+ && DOM.eventGetTarget(event) == icon.getElement()) {
+ // Click on icon should do nothing if widget is disabled
+ if (isEnabled()) {
+ setValue(!getValue());
+ }
+ }
+ super.onBrowserEvent(event);
+ if (event.getTypeInt() == Event.ONLOAD) {
+ Util.notifyParentOfSizeChange(this, true);
+ }
+ }
+
+ /**
+ * Gives access to the input element.
+ *
+ * @return Element of the CheckBox itself
+ */
+ private Element getCheckBoxElement() {
+ // FIXME: Would love to use a better way to access the checkbox element
+ return getElement().getFirstChildElement();
+ }
+
+ @Override
+ public void setAriaRequired(boolean required) {
+ AriaHelper.handleInputRequired(getCheckBoxElement(), required);
+ }
+
+ @Override
+ public void setAriaInvalid(boolean invalid) {
+ AriaHelper.handleInputInvalid(getCheckBoxElement(), invalid);
+ }
+}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
index 62e8e123db..0e50bd639d 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
@@ -39,12 +39,12 @@ import com.vaadin.client.VConsole;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
-import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.Action;
import com.vaadin.client.ui.ActionOwner;
import com.vaadin.client.ui.SimpleManagedLayout;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.Connect.LoadStyle;
+import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector;
import com.vaadin.v7.client.ui.VCalendar;
import com.vaadin.v7.client.ui.VCalendar.BackwardListener;
import com.vaadin.v7.client.ui.VCalendar.DateClickListener;
@@ -82,14 +82,14 @@ import com.vaadin.v7.ui.Calendar;
* @author Vaadin Ltd.
*/
@Connect(value = Calendar.class, loadStyle = LoadStyle.LAZY)
-public class CalendarConnector extends AbstractComponentConnector
+public class CalendarConnector extends AbstractLegacyComponentConnector
implements ActionOwner, SimpleManagedLayout, Paintable {
private CalendarServerRpc rpc = RpcProxy.create(CalendarServerRpc.class,
this);
- private final HashMap<String, String> actionMap = new HashMap<String, String>();
- private HashMap<Object, String> tooltips = new HashMap<Object, String>();
+ private final HashMap<String, String> actionMap = new HashMap<>();
+ private HashMap<Object, String> tooltips = new HashMap<>();
private static final String DROPHANDLER_ACCEPT_CRITERIA_PAINT_TAG = "-ac";
@@ -469,8 +469,8 @@ public class CalendarConnector extends AbstractComponentConnector
}
private Action[] getActionsBetween(Date start, Date end) {
- List<Action> actions = new ArrayList<Action>();
- List<String> ids = new ArrayList<String>();
+ List<Action> actions = new ArrayList<>();
+ List<String> ids = new ArrayList<>();
for (int i = 0; i < actionKeys.size(); i++) {
String actionKey = actionKeys.get(i);
@@ -525,7 +525,7 @@ public class CalendarConnector extends AbstractComponentConnector
return actions.toArray(new Action[actions.size()]);
}
- private List<String> actionKeys = new ArrayList<String>();
+ private List<String> actionKeys = new ArrayList<>();
private void updateActionMap(List<CalendarState.Action> actions) {
actionMap.clear();
@@ -624,7 +624,7 @@ public class CalendarConnector extends AbstractComponentConnector
*/
@Override
public Action[] getActions() {
- List<Action> actions = new ArrayList<Action>();
+ List<Action> actions = new ArrayList<>();
for (int i = 0; i < actionKeys.size(); i++) {
final String actionKey = actionKeys.get(i);
final VCalendarAction a = new VCalendarAction(this, rpc, actionKey);
@@ -655,7 +655,7 @@ public class CalendarConnector extends AbstractComponentConnector
private List<CalendarEvent> calendarEventListOf(
List<CalendarState.Event> events, boolean format24h) {
- List<CalendarEvent> list = new ArrayList<CalendarEvent>(events.size());
+ List<CalendarEvent> list = new ArrayList<>(events.size());
for (CalendarState.Event event : events) {
final String dateFrom = event.dateFrom;
final String dateTo = event.dateTo;
@@ -680,7 +680,7 @@ public class CalendarConnector extends AbstractComponentConnector
}
private List<CalendarDay> calendarDayListOf(List<CalendarState.Day> days) {
- List<CalendarDay> list = new ArrayList<CalendarDay>(days.size());
+ List<CalendarDay> list = new ArrayList<>(days.size());
for (CalendarState.Day day : days) {
CalendarDay d = new CalendarDay(day.date, day.localizedDateFormat,
day.dayOfWeek, day.week, day.yearOfWeek);
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/checkbox/CheckBoxConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/checkbox/CheckBoxConnector.java
index 5d103e419f..d2a761ba0a 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/checkbox/CheckBoxConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/checkbox/CheckBoxConnector.java
@@ -27,11 +27,11 @@ import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.ConnectorFocusAndBlurHandler;
import com.vaadin.client.ui.Icon;
-import com.vaadin.client.ui.VCheckBox;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.Connect;
import com.vaadin.v7.client.ui.AbstractFieldConnector;
+import com.vaadin.v7.client.ui.VCheckBox;
import com.vaadin.v7.shared.ui.checkbox.CheckBoxServerRpc;
import com.vaadin.v7.shared.ui.checkbox.CheckBoxState;
import com.vaadin.v7.ui.CheckBox;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/AbstractColorPickerConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/AbstractColorPickerConnector.java
index aa5e878312..bd51cecf5a 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/AbstractColorPickerConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/AbstractColorPickerConnector.java
@@ -18,7 +18,7 @@ package com.vaadin.v7.client.ui.colorpicker;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.vaadin.client.communication.StateChangeEvent;
-import com.vaadin.client.ui.AbstractComponentConnector;
+import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector;
import com.vaadin.v7.shared.ui.colorpicker.ColorPickerState;
/**
@@ -29,7 +29,7 @@ import com.vaadin.v7.shared.ui.colorpicker.ColorPickerState;
*/
@Deprecated
public abstract class AbstractColorPickerConnector
- extends AbstractComponentConnector implements ClickHandler {
+ extends AbstractLegacyComponentConnector implements ClickHandler {
private static final String DEFAULT_WIDTH_STYLE = "v-default-caption-width";
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGradientConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGradientConnector.java
index 014e4b6f04..f71ac4d05e 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGradientConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGradientConnector.java
@@ -21,10 +21,10 @@ import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
-import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.colorpicker.VColorPickerGradient;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.Connect.LoadStyle;
+import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector;
import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGradientServerRpc;
import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGradientState;
@@ -37,8 +37,8 @@ import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGradientState;
* @since 7.0.0
*/
@Connect(value = com.vaadin.v7.ui.components.colorpicker.ColorPickerGradient.class, loadStyle = LoadStyle.LAZY)
-public class ColorPickerGradientConnector extends AbstractComponentConnector
- implements MouseUpHandler {
+public class ColorPickerGradientConnector
+ extends AbstractLegacyComponentConnector implements MouseUpHandler {
private ColorPickerGradientServerRpc rpc = RpcProxy
.create(ColorPickerGradientServerRpc.class, this);
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java
index 561f28af3a..8d7c94cb2f 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java
@@ -21,10 +21,10 @@ import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
-import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.colorpicker.VColorPickerGrid;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.Connect.LoadStyle;
+import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector;
import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGridServerRpc;
import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGridState;
@@ -37,7 +37,7 @@ import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGridState;
* @since 7.0.0
*/
@Connect(value = com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid.class, loadStyle = LoadStyle.LAZY)
-public class ColorPickerGridConnector extends AbstractComponentConnector
+public class ColorPickerGridConnector extends AbstractLegacyComponentConnector
implements ClickHandler {
private ColorPickerGridServerRpc rpc = RpcProxy
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/label/LabelConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/label/LabelConnector.java
index 7e37aa5f77..9ef43775bf 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/label/LabelConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/label/LabelConnector.java
@@ -20,15 +20,15 @@ import com.google.gwt.dom.client.PreElement;
import com.vaadin.client.Profiler;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.communication.StateChangeEvent;
-import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.Connect.LoadStyle;
+import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector;
import com.vaadin.v7.client.ui.VLabel;
import com.vaadin.v7.shared.ui.label.LabelState;
import com.vaadin.v7.ui.Label;
@Connect(value = Label.class, loadStyle = LoadStyle.EAGER)
-public class LabelConnector extends AbstractComponentConnector {
+public class LabelConnector extends AbstractLegacyComponentConnector {
@Override
public LabelState getState() {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java
index d8d491ff31..668ffd568a 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java
@@ -22,7 +22,6 @@ import java.util.Collection;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
-import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.UI;
import com.vaadin.ui.Window.CloseEvent;
import com.vaadin.ui.Window.CloseListener;
@@ -43,7 +42,7 @@ import com.vaadin.v7.ui.components.colorpicker.ColorSelector;
* @since 7.0.0
*/
@Deprecated
-public abstract class AbstractColorPicker extends AbstractComponent
+public abstract class AbstractColorPicker extends AbstractLegacyComponent
implements CloseListener, ColorSelector {
private static final Method COLOR_CHANGE_METHOD;
static {
@@ -478,7 +477,6 @@ public abstract class AbstractColorPicker extends AbstractComponent
window.setHistoryVisible(historyVisible);
window.setPreviewVisible(textfieldVisible);
- window.setImmediate(true);
window.addCloseListener(this);
window.addColorChangeListener(new ColorChangeListener() {
@Override
@@ -576,7 +574,7 @@ public abstract class AbstractColorPicker extends AbstractComponent
DesignAttributeHandler.writeAttribute("color", attribute,
color.getCSS(), Color.WHITE.getCSS(), String.class);
DesignAttributeHandler.writeAttribute("popup-style", attribute,
- (popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple"),
+ popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple",
"normal", String.class);
DesignAttributeHandler.writeAttribute("position", attribute,
positionX + "," + positionY, "0,0", String.class);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
index 180c1f15b8..8ac94f6592 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
@@ -37,7 +37,6 @@ import com.vaadin.server.AbstractErrorMessage;
import com.vaadin.server.CompositeErrorMessage;
import com.vaadin.server.ErrorMessage;
import com.vaadin.shared.util.SharedUtil;
-import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Component;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
@@ -83,7 +82,7 @@ import com.vaadin.v7.shared.AbstractFieldState;
*/
@SuppressWarnings("serial")
@Deprecated
-public abstract class AbstractField<T> extends AbstractComponent
+public abstract class AbstractField<T> extends AbstractLegacyComponent
implements Field<T>, Property.ReadOnlyStatusChangeListener,
Property.ReadOnlyStatusChangeNotifier, Action.ShortcutNotifier {
@@ -211,7 +210,7 @@ public abstract class AbstractField<T> extends AbstractComponent
@Override
public boolean isReadOnly() {
return super.isReadOnly()
- || (dataSource != null && dataSource.isReadOnly());
+ || dataSource != null && dataSource.isReadOnly();
}
/**
@@ -253,7 +252,7 @@ public abstract class AbstractField<T> extends AbstractComponent
public void commit()
throws Buffered.SourceException, InvalidValueException {
if (dataSource != null && !dataSource.isReadOnly()) {
- if ((isInvalidCommitted() || isValid())) {
+ if (isInvalidCommitted() || isValid()) {
try {
// Commits the value to datasource.
@@ -662,7 +661,7 @@ public abstract class AbstractField<T> extends AbstractComponent
// Fires value change if the value has changed
T value = getInternalValue();
- if ((value != oldValue) && ((value != null && !value.equals(oldValue))
+ if (value != oldValue && (value != null && !value.equals(oldValue)
|| value == null)) {
fireValueChange(false);
}
@@ -1521,7 +1520,7 @@ public abstract class AbstractField<T> extends AbstractComponent
@Override
public boolean isEmpty() {
- return (getFieldValue() == null);
+ return getFieldValue() == null;
}
@Override
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractLegacyComponent.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractLegacyComponent.java
new file mode 100644
index 0000000000..11ac309089
--- /dev/null
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractLegacyComponent.java
@@ -0,0 +1,121 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.ui;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
+import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
+
+/**
+ * An abstract base class for compatibility components.
+ * <p>
+ * Used since immediate property has been removed in Vaadin 8 from
+ * {@link AbstractComponent}.
+ *
+ * @author Vaadin Ltd
+ * @since 8.0
+ * @deprecated only used for Vaadin 7 compatiblity components
+ */
+@Deprecated
+public class AbstractLegacyComponent extends AbstractComponent {
+
+ private Boolean explicitImmediateValue;
+
+ /**
+ * Returns the explicitly set immediate value.
+ *
+ * @return the explicitly set immediate value or null if
+ * {@link #setImmediate(boolean)} has not been explicitly invoked
+ */
+ protected Boolean getExplicitImmediateValue() {
+ return explicitImmediateValue;
+ }
+
+ /**
+ * Returns the immediate mode of the component.
+ * <p>
+ * Since Vaadin 8, the default mode is immediate.
+ *
+ * @return true if the component is in immediate mode (explicitly or
+ * implicitly set), false if the component if not in immediate mode
+ */
+ public boolean isImmediate() {
+ if (explicitImmediateValue != null) {
+ return explicitImmediateValue;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Sets the component's immediate mode to the specified status.
+ * <p>
+ * Since Vaadin 8, the default mode is immediate.
+ *
+ * @param immediate
+ * the boolean value specifying if the component should be in the
+ * immediate mode after the call.
+ */
+ public void setImmediate(boolean immediate) {
+ explicitImmediateValue = immediate;
+ getState().immediate = immediate;
+ }
+
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+
+ Attributes attr = design.attributes();
+ // handle immediate
+ if (attr.hasKey("immediate")) {
+ setImmediate(DesignAttributeHandler.getFormatter()
+ .parse(attr.get("immediate"), Boolean.class));
+ }
+ }
+
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+
+ AbstractLegacyComponent def = designContext.getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ // handle immediate
+ if (explicitImmediateValue != null) {
+ DesignAttributeHandler.writeAttribute("immediate", attr,
+ explicitImmediateValue, def.isImmediate(), Boolean.class);
+ }
+ }
+
+ @Override
+ public void beforeClientResponse(boolean initial) {
+ super.beforeClientResponse(initial);
+ getState().immediate = isImmediate();
+ }
+
+ @Override
+ protected AbstractLegacyComponentState getState() {
+ return (AbstractLegacyComponentState) super.getState();
+ }
+
+ @Override
+ protected AbstractLegacyComponentState getState(boolean markAsDirty) {
+ return (AbstractLegacyComponentState) super.getState(markAsDirty);
+ }
+}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java
index d8ffd0b1e8..da6443da29 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java
@@ -49,7 +49,6 @@ import com.vaadin.event.dd.TargetDetails;
import com.vaadin.server.KeyMapper;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
-import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.LegacyComponent;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
@@ -119,7 +118,7 @@ import com.vaadin.v7.ui.components.calendar.handler.BasicWeekClickHandler;
*/
@SuppressWarnings("serial")
@Deprecated
-public class Calendar extends AbstractComponent
+public class Calendar extends AbstractLegacyComponent
implements CalendarComponentEvents.NavigationNotifier,
CalendarComponentEvents.EventMoveNotifier,
CalendarComponentEvents.RangeSelectNotifier,
@@ -440,7 +439,7 @@ public class Calendar extends AbstractComponent
}
private void setupCalendarEvents() {
- int durationInDays = (int) (((endDate.getTime()) - startDate.getTime())
+ int durationInDays = (int) ((endDate.getTime() - startDate.getTime())
/ DateConstants.DAYINMILLIS);
durationInDays++;
if (durationInDays > 60) {
@@ -503,7 +502,7 @@ public class Calendar extends AbstractComponent
endDate = getEndDate();
}
- int durationInDays = (int) (((endDate.getTime()) - startDate.getTime())
+ int durationInDays = (int) ((endDate.getTime() - startDate.getTime())
/ DateConstants.DAYINMILLIS);
durationInDays++;
if (durationInDays > 60) {
@@ -524,7 +523,7 @@ public class Calendar extends AbstractComponent
df_date.setTimeZone(currentCalendar.getTimeZone());
df_time.setTimeZone(currentCalendar.getTimeZone());
- state.now = (df_date.format(now) + " " + df_time.format(now));
+ state.now = df_date.format(now) + " " + df_time.format(now);
Date firstDateToShow = expandStartDate(startDate, durationInDays > 7);
Date lastDateToShow = expandEndDate(endDate, durationInDays > 7);
@@ -570,7 +569,7 @@ public class Calendar extends AbstractComponent
cal.add(java.util.Calendar.SECOND, -1);
Date end = cal.getTime();
- boolean monthView = (durationInDays > 7);
+ boolean monthView = durationInDays > 7;
/**
* If in day or week view add actions for each half-an-hour.
@@ -903,9 +902,9 @@ public class Calendar extends AbstractComponent
* The date caption pattern.
*/
public void setWeeklyCaptionFormat(String dateFormatPattern) {
- if ((weeklyCaptionFormat == null && dateFormatPattern != null)
- || (weeklyCaptionFormat != null
- && !weeklyCaptionFormat.equals(dateFormatPattern))) {
+ if (weeklyCaptionFormat == null && dateFormatPattern != null
+ || weeklyCaptionFormat != null
+ && !weeklyCaptionFormat.equals(dateFormatPattern)) {
weeklyCaptionFormat = dateFormatPattern;
markAsDirty();
}
@@ -932,7 +931,7 @@ public class Calendar extends AbstractComponent
// monday first
if (calendar.getFirstDayOfWeek() == java.util.Calendar.MONDAY) {
- fow = (fow == java.util.Calendar.SUNDAY) ? 7 : fow - 1;
+ fow = fow == java.util.Calendar.SUNDAY ? 7 : fow - 1;
}
return fow;
@@ -1985,8 +1984,7 @@ public class Calendar extends AbstractComponent
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()));
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java
index e9bdf8771e..579bc063b8 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.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
@@ -55,7 +55,7 @@ import com.vaadin.v7.shared.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
@@ -64,7 +64,7 @@ import com.vaadin.v7.shared.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
@@ -78,7 +78,7 @@ import com.vaadin.v7.shared.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
@@ -134,7 +134,7 @@ public class Form extends AbstractField<Object>
/**
* 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().
*/
@@ -164,7 +164,7 @@ public class Form extends AbstractField<Object>
/**
* Constructs a new form with default layout.
- *
+ *
* <p>
* By default the form uses {@link FormLayout}.
* </p>
@@ -176,7 +176,7 @@ public class Form extends AbstractField<Object>
/**
* Constructs a new form with given {@link Layout}.
- *
+ *
* @param formLayout
* the layout of the form.
*/
@@ -187,7 +187,7 @@ public class Form extends AbstractField<Object>
/**
* Constructs a new form with given {@link Layout} and
* {@link FormFieldFactory}.
- *
+ *
* @param formLayout
* the layout of the form.
* @param fieldFactory
@@ -231,7 +231,7 @@ public class Form extends AbstractField<Object>
/**
* 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
@@ -284,15 +284,15 @@ public class Form extends AbstractField<Object>
/**
* 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.
@@ -303,9 +303,9 @@ public class Form extends AbstractField<Object>
/**
* Is validation made automatically visible on commit?
- *
+ *
* See setValidationVisibleOnCommit().
- *
+ *
* @return true if validation is made automatically visible on commit.
*/
public boolean isValidationVisibleOnCommit() {
@@ -339,7 +339,7 @@ public class Form extends AbstractField<Object>
// Try to commit all
for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
try {
- final Field<?> f = (fields.get(i.next()));
+ final Field<?> f = fields.get(i.next());
// Commit only non-readonly fields.
if (!f.isReadOnly()) {
f.commit();
@@ -387,7 +387,7 @@ public class Form extends AbstractField<Object>
// Try to discard all changes
for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
try {
- (fields.get(i.next())).discard();
+ fields.get(i.next()).discard();
} catch (final Buffered.SourceException e) {
if (problems == null) {
problems = new LinkedList<>();
@@ -445,14 +445,14 @@ public class Form extends AbstractField<Object>
this.buffered = buffered;
for (final Iterator<Object> i = propertyIds.iterator(); i
.hasNext();) {
- (fields.get(i.next())).setBuffered(buffered);
+ fields.get(i.next()).setBuffered(buffered);
}
}
}
/**
* Adds a new property to form and create corresponding field.
- *
+ *
* @see com.vaadin.data.Item#addItemProperty(Object, Property)
*/
@Override
@@ -488,16 +488,16 @@ public class Form extends AbstractField<Object>
/**
* 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
@@ -512,12 +512,12 @@ public class Form extends AbstractField<Object>
/**
* 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
@@ -539,8 +539,8 @@ public class Form extends AbstractField<Object>
// form.
// Should this also include invalidCommitted (#3993)?
field.setBuffered(buffered);
- if (isImmediate() && field instanceof AbstractComponent) {
- ((AbstractComponent) field).setImmediate(true);
+ if (isImmediate() && field instanceof AbstractLegacyComponent) {
+ ((AbstractLegacyComponent) field).setImmediate(true);
}
}
@@ -553,11 +553,11 @@ public class Form extends AbstractField<Object>
* 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
*/
@@ -577,13 +577,13 @@ public class Form extends AbstractField<Object>
/**
* 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
@@ -604,7 +604,7 @@ public class Form extends AbstractField<Object>
/**
* Gets the field identified by the propertyid.
- *
+ *
* @param propertyId
* the id of the property.
*/
@@ -620,7 +620,7 @@ public class Form extends AbstractField<Object>
/**
* Removes the property and corresponding field from the form.
- *
+ *
* @see com.vaadin.data.Item#removeItemProperty(Object)
*/
@Override
@@ -647,7 +647,7 @@ public class Form extends AbstractField<Object>
* 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.
*/
@@ -660,7 +660,7 @@ public class Form extends AbstractField<Object>
/**
* 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>.
*/
@@ -685,12 +685,12 @@ public class Form extends AbstractField<Object>
/**
* 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
@@ -702,13 +702,13 @@ public class Form extends AbstractField<Object>
/**
* 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,
@@ -759,7 +759,7 @@ public class Form extends AbstractField<Object>
* 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,7 +771,7 @@ public class Form extends AbstractField<Object>
// expect developer has e.g. PropertyFormatter that he wishes to use and
// assign the property to the Viewer instead.
boolean hasFilterProperty = field.getPropertyDataSource() != null
- && (field.getPropertyDataSource() instanceof Property.Viewer);
+ && field.getPropertyDataSource() instanceof Property.Viewer;
if (hasFilterProperty) {
((Property.Viewer) field.getPropertyDataSource())
.setPropertyDataSource(property);
@@ -782,12 +782,12 @@ public class Form extends AbstractField<Object>
/**
* 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() {
@@ -796,11 +796,11 @@ public class Form extends AbstractField<Object>
/**
* 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.
*/
@@ -839,16 +839,16 @@ public class Form extends AbstractField<Object>
/**
* 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
@@ -883,7 +883,7 @@ public class Form extends AbstractField<Object>
boolean isMultiselect = false;
for (int i = 0; i < values.length && !found; i++) {
if (values[i] == value
- || (value != null && value.equals(values[i]))) {
+ || value != null && value.equals(values[i])) {
found = true;
}
}
@@ -895,7 +895,7 @@ public class Form extends AbstractField<Object>
found = false;
for (int i = 0; i < values.length && !found; i++) {
if (values[i] == val
- || (val != null && val.equals(values[i]))) {
+ || val != null && val.equals(values[i])) {
found = true;
}
}
@@ -958,20 +958,20 @@ public class Form extends AbstractField<Object>
/**
* Checks the validity of the Form and all of its fields.
- *
+ *
* @see com.vaadin.legacy.data.Validatable#validate()
*/
@Override
public void validate() throws Validator.InvalidValueException {
super.validate();
for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
- (fields.get(i.next())).validate();
+ fields.get(i.next()).validate();
}
}
/**
* Checks the validabtable object accept invalid values.
- *
+ *
* @see com.vaadin.legacy.data.Validatable#isInvalidAllowed()
*/
@Override
@@ -981,7 +981,7 @@ public class Form extends AbstractField<Object>
/**
* Should the validabtable object accept invalid values.
- *
+ *
* @see com.vaadin.legacy.data.Validatable#setInvalidAllowed(boolean)
*/
@Override
@@ -992,24 +992,24 @@ public class Form extends AbstractField<Object>
/**
* Sets the component's to read-only mode to the specified state.
- *
+ *
* @see com.vaadin.ui.Component#setReadOnly(boolean)
*/
@Override
public void setReadOnly(boolean readOnly) {
super.setReadOnly(readOnly);
for (final Iterator<?> i = propertyIds.iterator(); i.hasNext();) {
- (fields.get(i.next())).setReadOnly(readOnly);
+ fields.get(i.next()).setReadOnly(readOnly);
}
}
/**
* 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
@@ -1021,7 +1021,7 @@ public class Form extends AbstractField<Object>
/**
* Get the field factory of the form.
- *
+ *
* @return the FormFieldFactory Factory used to create the fields.
*/
public FormFieldFactory getFormFieldFactory() {
@@ -1030,7 +1030,7 @@ public class Form extends AbstractField<Object>
/**
* Gets the field type.
- *
+ *
* @see com.vaadin.legacy.ui.AbstractField#getType()
*/
@Override
@@ -1043,9 +1043,9 @@ public class Form extends AbstractField<Object>
/**
* Sets the internal value.
- *
+ *
* This is relevant when the Form is used as Field.
- *
+ *
* @see com.vaadin.legacy.ui.AbstractField#setInternalValue(java.lang.Object)
*/
@Override
@@ -1067,7 +1067,7 @@ public class Form extends AbstractField<Object>
* 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() {
@@ -1093,9 +1093,9 @@ public class Form extends AbstractField<Object>
/**
* Updates the internal form datasource.
- *
+ *
* Method setFormDataSource.
- *
+ *
* @param data
* @param properties
*/
@@ -1121,7 +1121,7 @@ public class Form extends AbstractField<Object>
/**
* Returns the visibleProperties.
- *
+ *
* @return the Collection of visible Item properites.
*/
public Collection<?> getVisibleItemProperties() {
@@ -1130,7 +1130,7 @@ public class Form extends AbstractField<Object>
/**
* Sets the visibleProperties.
- *
+ *
* @param visibleProperties
* the visibleProperties to set.
*/
@@ -1145,7 +1145,7 @@ public class Form extends AbstractField<Object>
/**
* Sets the visibleProperties.
- *
+ *
* @param visibleProperties
* the visibleProperties to set.
*/
@@ -1159,7 +1159,7 @@ public class Form extends AbstractField<Object>
/**
* Focuses the first field in the form.
- *
+ *
* @see com.vaadin.ui.Component.Focusable#focus()
*/
@Override
@@ -1172,7 +1172,7 @@ public class Form extends AbstractField<Object>
/**
* Sets the Tabulator index of this Focusable component.
- *
+ *
* @see com.vaadin.ui.Component.Focusable#setTabIndex(int)
*/
@Override
@@ -1180,7 +1180,7 @@ public class Form extends AbstractField<Object>
super.setTabIndex(tabIndex);
for (final Iterator<?> i = getItemPropertyIds().iterator(); i
.hasNext();) {
- (getField(i.next())).setTabIndex(tabIndex);
+ getField(i.next()).setTabIndex(tabIndex);
}
}
@@ -1193,8 +1193,8 @@ public class Form extends AbstractField<Object>
super.setImmediate(immediate);
for (Iterator<Field<?>> i = fields.values().iterator(); i.hasNext();) {
Field<?> f = i.next();
- if (f instanceof AbstractComponent) {
- ((AbstractComponent) f).setImmediate(immediate);
+ if (f instanceof AbstractLegacyComponent) {
+ ((AbstractLegacyComponent) f).setImmediate(immediate);
}
}
}
@@ -1203,7 +1203,7 @@ public class Form extends AbstractField<Object>
* {@inheritDoc}
* <p>
* A Form is empty if all of its fields are empty.
- *
+ *
*/
@Override
public boolean isEmpty() {
@@ -1222,7 +1222,7 @@ public class Form extends AbstractField<Object>
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#clear()
*/
@Override
@@ -1237,7 +1237,7 @@ public class Form extends AbstractField<Object>
/**
* Adding validators directly to form is not supported.
- *
+ *
* Add the validators to form fields instead.
*/
@Override
@@ -1248,7 +1248,7 @@ public class Form extends AbstractField<Object>
/**
* 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
*/
@@ -1259,7 +1259,7 @@ public class Form extends AbstractField<Object>
/**
* 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
*/
@@ -1295,7 +1295,7 @@ public class Form extends AbstractField<Object>
* {@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() {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java
index 9836f33d20..559df24875 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java
@@ -23,7 +23,6 @@ import java.util.Locale;
import org.jsoup.nodes.Element;
import com.vaadin.shared.util.SharedUtil;
-import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Component;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignFormatter;
@@ -57,7 +56,7 @@ import com.vaadin.v7.shared.ui.label.LabelState;
*/
@SuppressWarnings("serial")
@Deprecated
-public class Label extends AbstractComponent implements Property<String>,
+public class Label extends AbstractLegacyComponent implements Property<String>,
Property.Viewer, Property.ValueChangeListener,
Property.ValueChangeNotifier, Comparable<Label> {
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java
index d3bc4b1473..9483ac3eca 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java
@@ -31,7 +31,6 @@ import com.vaadin.server.PaintTarget;
import com.vaadin.server.StreamVariable.StreamingProgressEvent;
import com.vaadin.shared.EventId;
import com.vaadin.shared.Registration;
-import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Component;
import com.vaadin.ui.LegacyComponent;
import com.vaadin.util.ReflectTools;
@@ -79,7 +78,7 @@ import com.vaadin.v7.shared.ui.upload.UploadState;
*/
@SuppressWarnings("serial")
@Deprecated
-public class Upload extends AbstractComponent
+public class Upload extends AbstractLegacyComponent
implements Component.Focusable, LegacyComponent {
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java
index 03f920c92b..a6f35fa6f9 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.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
@@ -45,12 +45,12 @@ import com.vaadin.v7.ui.Slider.ValueOutOfBoundsException;
/**
* A component that represents color selection popup within a color picker.
- *
+ *
* @since 7.0.0
*/
@Deprecated
-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";
@@ -155,7 +155,6 @@ public class ColorPickerPopup extends Window implements ClickListener,
setContent(layout);
setStyleName(STYLENAME);
setResizable(false);
- setImmediate(true);
// Create the history
history = new ColorPickerHistory();
history.addColorChangeListener(this);
@@ -257,7 +256,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Creates the RGB tab.
- *
+ *
* @return the component
*/
private Component createRGBTab(Color color) {
@@ -287,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);
}
}
@@ -338,7 +337,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Creates the hsv tab.
- *
+ *
* @return the component
*/
private Component createHSVTab(Color color) {
@@ -372,16 +371,16 @@ 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);
/*
@@ -403,14 +402,14 @@ 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);
}
}
@@ -424,15 +423,15 @@ 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);
}
}
@@ -446,7 +445,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Creates the select tab.
- *
+ *
* @return the component
*/
private Component createSelectTab() {
@@ -505,7 +504,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Gets the history.
- *
+ *
* @return the history
*/
public ColorPickerHistory getHistory() {
@@ -536,7 +535,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Gets the color history.
- *
+ *
* @return the color history
*/
public List<Color> getColorHistory() {
@@ -569,10 +568,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);
}
}
@@ -582,10 +581,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);
}
}
@@ -601,7 +598,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
@@ -618,7 +615,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* How many tabs are visible
- *
+ *
* @return The number of tabs visible
*/
private int tabsNumVisible() {
@@ -640,7 +637,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set RGB tab visibility
- *
+ *
* @param visible
* The visibility of the RGB tab
*/
@@ -656,7 +653,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set HSV tab visibility
- *
+ *
* @param visible
* The visibility of the HSV tab
*/
@@ -672,7 +669,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set Swatches tab visibility
- *
+ *
* @param visible
* The visibility of the Swatches tab
*/
@@ -688,7 +685,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set the History visibility
- *
+ *
* @param visible
*/
public void setHistoryVisible(boolean visible) {
@@ -698,7 +695,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set the preview visibility
- *
+ *
* @param visible
*/
public void setPreviewVisible(boolean visible) {
@@ -712,7 +709,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
@Override
public Color calculate(int x, int y) {
- float h = (x / 220f);
+ float h = x / 220f;
float s = 1f;
float v = 1f;
@@ -764,8 +761,8 @@ public class ColorPickerPopup extends Window implements ClickListener,
@Override
public Color calculate(int x, int y) {
- float saturation = 1f - (y / 220.0f);
- float value = (x / 220.0f);
+ float saturation = 1f - y / 220.0f;
+ float value = x / 220.0f;
float hue = Float.parseFloat(hueSlider.getValue().toString())
/ 360f;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java
index 2b627efbe7..9a6e3598e8 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java
@@ -59,7 +59,6 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector,
private ColorPickerPreview() {
setStyleName("v-colorpicker-preview");
- setImmediate(true);
field = new TextField();
field.setImmediate(true);
field.setSizeFull();
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java
new file mode 100644
index 0000000000..0577a5743e
--- /dev/null
+++ b/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java
@@ -0,0 +1,224 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.ui;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.lang.reflect.Field;
+import java.nio.charset.Charset;
+import java.util.Locale;
+
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+import org.jsoup.parser.Tag;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.vaadin.server.ErrorMessage.ErrorLevel;
+import com.vaadin.server.ExternalResource;
+import com.vaadin.server.FileResource;
+import com.vaadin.server.Responsive;
+import com.vaadin.server.ThemeResource;
+import com.vaadin.server.UserError;
+import com.vaadin.tests.design.DeclarativeTestBase;
+import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test cases for reading and writing the properties of AbstractComponent.
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class AbstractLegacyComponentDeclarativeTest
+ extends DeclarativeTestBase<AbstractLegacyComponent> {
+
+ private AbstractLegacyComponent component;
+
+ @Before
+ public void setUp() {
+ NativeSelect ns = new NativeSelect();
+ component = ns;
+ }
+
+ @Test
+ public void testEmptyDesign() {
+ String design = "<vaadin7-native-select>";
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testProperties() {
+ String design = "<vaadin7-native-select id=\"testId\" primary-style-name=\"test-style\" "
+ + "caption=\"test-caption\" locale=\"fi_FI\" description=\"test-description\" "
+ + "error=\"<div>test-error</div>\" />";
+ component.setId("testId");
+ component.setPrimaryStyleName("test-style");
+ component.setCaption("test-caption");
+ component.setLocale(new Locale("fi", "FI"));
+ component.setDescription("test-description");
+ component.setComponentError(new UserError("<div>test-error</div>",
+ com.vaadin.server.AbstractErrorMessage.ContentMode.HTML,
+ ErrorLevel.ERROR));
+ component.setImmediate(true);
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testReadImmediate() {
+ // Additional tests for the immediate property, including
+ // explicit immediate values
+ String[] design = { "<vaadin7-native-select/>",
+ "<vaadin7-native-select immediate=\"false\"/>",
+ "<vaadin7-native-select immediate=\"true\"/>",
+ "<vaadin7-native-select immediate />" };
+ Boolean[] explicitImmediate = { null, Boolean.FALSE, Boolean.TRUE,
+ Boolean.TRUE };
+ boolean[] immediate = { true, false, true, true };
+ for (int i = 0; i < design.length; i++) {
+ component = (AbstractLegacyComponent) Design
+ .read(new ByteArrayInputStream(
+ design[i].getBytes(Charset.forName("UTF-8"))));
+ assertEquals(immediate[i], component.isImmediate());
+ assertEquals(explicitImmediate[i], getExplicitImmediate(component));
+ }
+ }
+
+ @Test
+ public void testExternalIcon() {
+ String design = "<vaadin7-native-select icon=\"http://example.com/example.gif\"/>";
+ component.setIcon(
+ new ExternalResource("http://example.com/example.gif"));
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testThemeIcon() {
+ String design = "<vaadin7-native-select icon=\"theme://example.gif\"/>";
+ component.setIcon(new ThemeResource("example.gif"));
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testFileResourceIcon() {
+ String design = "<vaadin7-native-select icon=\"img/example.gif\"/>";
+ component.setIcon(new FileResource(new File("img/example.gif")));
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testWidthAndHeight() {
+ String design = "<vaadin7-native-select width=\"70%\" height=\"12px\"/>";
+ component.setWidth("70%");
+ component.setHeight("12px");
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testSizeFull() {
+ String design = "<vaadin7-native-select size-full />";
+ component.setSizeFull();
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testHeightFull() {
+ String design = "<vaadin7-native-select height-full width=\"20px\"/>";
+ component.setHeight("100%");
+ component.setWidth("20px");
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testWidthFull() {
+ String design = "<vaadin7-native-select caption=\"Foo\" caption-as-html width-full height=\"20px\"></vaadin7-native-select>";
+ AbstractLegacyComponent component = new NativeSelect();
+ component.setCaptionAsHtml(true);
+ component.setCaption("Foo");
+ component.setHeight("20px");
+ component.setWidth("100%");
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testResponsive() {
+ String design = "<vaadin7-native-select responsive />";
+ Responsive.makeResponsive(component);
+ testRead(design, component);
+ testWrite(design, component);
+ }
+
+ @Test
+ public void testResponsiveFalse() {
+ String design = "<vaadin7-native-select responsive =\"false\"/>";
+ // Only test read as the attribute responsive=false would not be written
+ testRead(design, component);
+ }
+
+ @Test
+ public void testReadAlreadyResponsive() {
+ AbstractComponent component = new Label();
+ Responsive.makeResponsive(component);
+ Element design = createDesign(true);
+ component.readDesign(design, new DesignContext());
+ assertEquals("Component should have only one extension", 1,
+ component.getExtensions().size());
+ }
+
+ @Test
+ public void testUnknownProperties() {
+ String design = "<vaadin7-native-select foo=\"bar\"/>";
+
+ DesignContext context = readAndReturnContext(design);
+ NativeSelect ns = (NativeSelect) context.getRootComponent();
+ assertTrue("Custom attribute was preserved in custom attributes",
+ context.getCustomAttributes(ns).containsKey("foo"));
+
+ testWrite(ns, design, context);
+ }
+
+ private Element createDesign(boolean responsive) {
+ Attributes attributes = new Attributes();
+ attributes.put("responsive", responsive);
+ Element node = new Element(Tag.valueOf("vaadin-label"), "", attributes);
+ return node;
+ }
+
+ private Boolean getExplicitImmediate(AbstractLegacyComponent component) {
+ try {
+ Field immediate = AbstractLegacyComponent.class
+ .getDeclaredField("explicitImmediateValue");
+ immediate.setAccessible(true);
+ return (Boolean) immediate.get(component);
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Getting the field explicitImmediateValue failed.");
+ }
+ }
+}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentTest.java b/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentTest.java
index 1cc48ee3e2..1a683ad373 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentTest.java
@@ -1,14 +1,12 @@
-package com.vaadin.tests.server.component.abstractcomponent;
+package com.vaadin.v7.ui;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import com.vaadin.ui.AbstractComponent;
-
-public class AbstractComponentTest {
- AbstractComponent component = new AbstractComponent() {
+public class AbstractLegacyComponentTest {
+ AbstractLegacyComponent component = new AbstractLegacyComponent() {
};
@Test
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractFieldState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractFieldState.java
index 4ba42eba46..36e65acabe 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractFieldState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractFieldState.java
@@ -15,7 +15,7 @@
*/
package com.vaadin.v7.shared;
-import com.vaadin.shared.ui.TabIndexState;
+import com.vaadin.shared.annotations.NoLayout;
/**
* Shared state for {@link com.vaadin.ui.AbstractField}.
@@ -24,9 +24,14 @@ import com.vaadin.shared.ui.TabIndexState;
* @since 7.0.0
*
*/
-public class AbstractFieldState extends TabIndexState {
+public class AbstractFieldState extends AbstractLegacyComponentState {
public boolean propertyReadOnly = false;
public boolean hideErrors = false;
public boolean required = false;
public boolean modified = false;
+ /**
+ * The <i>tabulator index</i> of the field.
+ */
+ @NoLayout
+ public int tabIndex = 0;
}
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractLegacyComponentState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractLegacyComponentState.java
new file mode 100644
index 0000000000..adb6d96ae2
--- /dev/null
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/AbstractLegacyComponentState.java
@@ -0,0 +1,32 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.shared;
+
+import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.annotations.NoLayout;
+
+/**
+ * Shared state for AbstractLegacyComponent.
+ *
+ * @author Vaadin Ltd
+ * @since 8.0
+ * @deprecated only used for Vaadin 7 compatiblity components
+ */
+@Deprecated
+public class AbstractLegacyComponentState extends AbstractComponentState {
+ @NoLayout
+ public boolean immediate = false;
+}
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java
index df62f84bbd..dd15c09b7f 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/calendar/CalendarState.java
@@ -17,13 +17,13 @@ package com.vaadin.v7.shared.ui.calendar;
import java.util.List;
-import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* @since 7.1.0
* @author Vaadin Ltd.
*/
-public class CalendarState extends AbstractComponentState {
+public class CalendarState extends AbstractLegacyComponentState {
public boolean format24H;
public String[] dayNames;
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGradientState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGradientState.java
index 0e418504f7..ba6a404519 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGradientState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGradientState.java
@@ -15,7 +15,7 @@
*/
package com.vaadin.v7.shared.ui.colorpicker;
-import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* Default shared state implementation for ColorPickerGradient.
@@ -23,7 +23,7 @@ import com.vaadin.shared.AbstractComponentState;
* @since 7.0.0
*/
@Deprecated
-public class ColorPickerGradientState extends AbstractComponentState {
+public class ColorPickerGradientState extends AbstractLegacyComponentState {
public int cursorX;
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGridState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGridState.java
index d822d6efc3..0dfcfadd94 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGridState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerGridState.java
@@ -15,7 +15,7 @@
*/
package com.vaadin.v7.shared.ui.colorpicker;
-import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* Default shared state implementation for ColorPickerGrid.
@@ -23,7 +23,7 @@ import com.vaadin.shared.AbstractComponentState;
* @since 7.0.0
*/
@Deprecated
-public class ColorPickerGridState extends AbstractComponentState {
+public class ColorPickerGridState extends AbstractLegacyComponentState {
public int rowCount;
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerState.java
index 84e3b846ca..be8fb79a18 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/ColorPickerState.java
@@ -15,8 +15,8 @@
*/
package com.vaadin.v7.shared.ui.colorpicker;
-import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.annotations.DelegateToWidget;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* Default shared state implementation for AbstractColorPicker.
@@ -24,7 +24,7 @@ import com.vaadin.shared.annotations.DelegateToWidget;
* @since 7.0.0
*/
@Deprecated
-public class ColorPickerState extends AbstractComponentState {
+public class ColorPickerState extends AbstractLegacyComponentState {
{
primaryStyleName = "v-colorpicker";
}
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/label/LabelState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/label/LabelState.java
index 64cc3b5ee5..2bded7f146 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/label/LabelState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/label/LabelState.java
@@ -15,9 +15,9 @@
*/
package com.vaadin.v7.shared.ui.label;
-import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
-public class LabelState extends AbstractComponentState {
+public class LabelState extends AbstractLegacyComponentState {
{
primaryStyleName = "v-label";
}
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/upload/UploadState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/upload/UploadState.java
index 2a6cb0ea66..90e4f1358d 100644
--- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/upload/UploadState.java
+++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/upload/UploadState.java
@@ -15,14 +15,14 @@
*/
package com.vaadin.v7.shared.ui.upload;
-import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.v7.shared.AbstractLegacyComponentState;
/**
* Shared state for the Upload component.
*
* @since 7.6
*/
-public class UploadState extends AbstractComponentState {
+public class UploadState extends AbstractLegacyComponentState {
{
primaryStyleName = "v-upload";
diff --git a/server/src/main/java/com/vaadin/server/DragAndDropService.java b/server/src/main/java/com/vaadin/server/DragAndDropService.java
index d23c87e468..f43c68fd6f 100644
--- a/server/src/main/java/com/vaadin/server/DragAndDropService.java
+++ b/server/src/main/java/com/vaadin/server/DragAndDropService.java
@@ -110,7 +110,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
*/
private void handleDropRequest(DropTarget dropTarget,
Map<String, Object> variables) {
- DropHandler dropHandler = (dropTarget).getDropHandler();
+ DropHandler dropHandler = dropTarget.getDropHandler();
if (dropHandler == null) {
// No dropHandler returned so no drop can be performed.
getLogger().log(Level.FINE,
@@ -217,16 +217,22 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
return transferable;
}
+ /**
+ * <p>
+ * Tests if the variable owner is enabled or not. The terminal should not
+ * send any variable changes to disabled variable owners.
+ * </p>
+ * Implementation detail: this method is originally from the VariableOwner
+ * class, which has been removed in Vaadin 8.
+ *
+ * @return <code>true</code> if the variable owner is enabled,
+ * <code>false</code> if not
+ */
@Override
public boolean isEnabled() {
return isConnectorEnabled();
}
- @Override
- public boolean isImmediate() {
- return true;
- }
-
public void printJSONResponse(Writer outWriter) throws IOException {
if (isDirty()) {
diff --git a/server/src/main/java/com/vaadin/server/VariableOwner.java b/server/src/main/java/com/vaadin/server/VariableOwner.java
index c431d37b96..d92b353cd4 100644
--- a/server/src/main/java/com/vaadin/server/VariableOwner.java
+++ b/server/src/main/java/com/vaadin/server/VariableOwner.java
@@ -62,24 +62,4 @@ public interface VariableOwner extends Serializable {
*/
public boolean isEnabled();
- /**
- * <p>
- * Tests if the variable owner is in immediate mode or not. Being in
- * 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
- * VariableOwners wish to offer the functionality. Such VariableOwners are
- * 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.
- */
- public boolean isImmediate();
-
}
diff --git a/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java b/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java
index 6814a96796..dd482a5bd0 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java
@@ -154,7 +154,7 @@ public abstract class AbstractColorPicker extends AbstractField<Color> {
/**
* Returns the current selected color of this color picker.
- *
+ *
* @return the selected color, not null
*/
@Override
@@ -165,7 +165,7 @@ public abstract class AbstractColorPicker extends AbstractField<Color> {
/**
* Sets the selected color of this color picker. If the new color is not
* equal to getValue(), fires a value change event.
- *
+ *
* @param color
* the new selected color, not null
*/
@@ -191,7 +191,7 @@ public abstract class AbstractColorPicker extends AbstractField<Color> {
/**
* Returns true if the component shows the default caption (css-code for the
* currently selected color, e.g. #ffffff) if no other caption is available.
- *
+ *
* @return {@code true} if the default caption is enabled, {@code false}
* otherwise
*/
@@ -447,7 +447,6 @@ public abstract class AbstractColorPicker extends AbstractField<Color> {
window.setHistoryVisible(historyVisible);
window.setPreviewVisible(textfieldVisible);
- window.setImmediate(true);
window.addCloseListener(
event -> getState().popupVisible = false);
window.addValueChangeListener(
@@ -515,7 +514,7 @@ public abstract class AbstractColorPicker extends AbstractField<Color> {
DesignAttributeHandler.writeAttribute("color", attribute,
getValue().getCSS(), Color.WHITE.getCSS(), String.class);
DesignAttributeHandler.writeAttribute("popup-style", attribute,
- (popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple"),
+ popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple",
"normal", String.class);
DesignAttributeHandler.writeAttribute("position", attribute,
positionX + "," + positionY, "0,0", String.class);
diff --git a/server/src/main/java/com/vaadin/ui/AbstractComponent.java b/server/src/main/java/com/vaadin/ui/AbstractComponent.java
index f794cab51b..0681612996 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractComponent.java
@@ -118,8 +118,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
private HasComponents parent;
- private Boolean explicitImmediateValue;
-
protected static final String DESIGN_ATTR_PLAIN_TEXT = "plain-text";
/* Constructor */
@@ -434,7 +432,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
return false;
} else if (!super.isConnectorEnabled()) {
return false;
- } else if ((getParent() instanceof SelectiveRenderer)
+ } else if (getParent() instanceof SelectiveRenderer
&& !((SelectiveRenderer) getParent()).isRendered(this)) {
return false;
} else {
@@ -442,44 +440,6 @@ 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
- */
- protected Boolean getExplicitImmediateValue() {
- return explicitImmediateValue;
- }
-
- /**
- * Returns the immediate mode of the component.
- * <p>
- * Since Vaadin 8, the default mode is immediate.
- *
- * @return true if the component is in immediate mode (explicitly or
- * implicitly set), false if the component if not in immediate mode
- */
- public boolean isImmediate() {
- if (explicitImmediateValue != null) {
- return explicitImmediateValue;
- } else {
- return true;
- }
- }
-
- /**
- * 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.
- */
- public void setImmediate(boolean immediate) {
- explicitImmediateValue = immediate;
- getState().immediate = immediate;
- }
-
/*
* (non-Javadoc)
*
@@ -771,8 +731,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
} else {
getState().errorMessage = null;
}
-
- getState().immediate = isImmediate();
}
/* General event framework */
@@ -1002,11 +960,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
}
- // handle immediate
- if (attr.hasKey("immediate")) {
- setImmediate(DesignAttributeHandler.getFormatter()
- .parse(attr.get("immediate"), Boolean.class));
- }
// handle locale
if (attr.hasKey("locale")) {
@@ -1289,11 +1242,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
for (String attribute : getDefaultAttributes()) {
DesignAttributeHandler.writeAttribute(this, attribute, attr, def);
}
- // handle immediate
- if (explicitImmediateValue != null) {
- DesignAttributeHandler.writeAttribute("immediate", attr,
- explicitImmediateValue, def.isImmediate(), Boolean.class);
- }
// handle locale
if (getLocale() != null && (getParent() == null
|| !getLocale().equals(getParent().getLocale()))) {
diff --git a/server/src/main/java/com/vaadin/ui/Component.java b/server/src/main/java/com/vaadin/ui/Component.java
index ffca8b808c..5822a7b078 100644
--- a/server/src/main/java/com/vaadin/ui/Component.java
+++ b/server/src/main/java/com/vaadin/ui/Component.java
@@ -858,7 +858,6 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* // 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
@@ -940,7 +939,6 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* // 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
diff --git a/server/src/main/java/com/vaadin/ui/TabSheet.java b/server/src/main/java/com/vaadin/ui/TabSheet.java
index 79fe6227a1..747f294666 100644
--- a/server/src/main/java/com/vaadin/ui/TabSheet.java
+++ b/server/src/main/java/com/vaadin/ui/TabSheet.java
@@ -142,7 +142,6 @@ public class TabSheet extends AbstractComponentContainer
// expand horizontally by default
setWidth(100, UNITS_PERCENTAGE);
- setImmediate(true);
setCloseHandler(new CloseHandler() {
@Override
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 4460b21d33..4cb79b9249 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
@@ -139,7 +139,6 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
setContent(layout);
setStyleName(STYLENAME);
setResizable(false);
- setImmediate(true);
// Create the history
history = new ColorPickerHistory();
history.addValueChangeListener(this::colorChanged);
@@ -147,7 +146,7 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
/**
* Instantiates a new color picker popup.
- *
+ *
* @param initialColor
* the initially selected color
*/
@@ -307,7 +306,6 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
private Slider createRGBSlider(String caption, String styleName) {
Slider redSlider = new Slider(caption, 0, 255);
- redSlider.setImmediate(true);
redSlider.setStyleName("rgb-slider");
redSlider.setWidth("220px");
redSlider.addStyleName(styleName);
@@ -345,16 +343,14 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
hueSlider.setStyleName("hsv-slider");
hueSlider.addStyleName("hue-slider");
hueSlider.setWidth("220px");
- hueSlider.setImmediate(true);
hueSlider.addValueChangeListener(event -> {
if (!updatingColors) {
- float hue = (Float.parseFloat(event.getValue().toString()))
+ float hue = Float.parseFloat(event.getValue().toString())
/ 360f;
- float saturation = (Float
- .parseFloat(saturationSlider.getValue().toString()))
- / 100f;
- float value = (Float
- .parseFloat(valueSlider.getValue().toString())) / 100f;
+ float saturation = Float.parseFloat(
+ saturationSlider.getValue().toString()) / 100f;
+ float value = Float
+ .parseFloat(valueSlider.getValue().toString()) / 100f;
// Set the color
Color newColor = new Color(
@@ -374,15 +370,14 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
saturationSlider.setStyleName("hsv-slider");
saturationSlider.setWidth("220px");
- saturationSlider.setImmediate(true);
saturationSlider.addValueChangeListener(event -> {
if (!updatingColors) {
- float hue = (Float.parseFloat(hueSlider.getValue().toString()))
+ float hue = Float.parseFloat(hueSlider.getValue().toString())
/ 360f;
- float saturation = (Float
- .parseFloat(event.getValue().toString())) / 100f;
- float value = (Float
- .parseFloat(valueSlider.getValue().toString())) / 100f;
+ float saturation = Float.parseFloat(event.getValue().toString())
+ / 100f;
+ float value = Float
+ .parseFloat(valueSlider.getValue().toString()) / 100f;
Color newColor = new Color(
Color.HSVtoRGB(hue, saturation, value));
setValue(newColor);
@@ -392,15 +387,13 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
valueSlider.setStyleName("hsv-slider");
valueSlider.setWidth("220px");
- valueSlider.setImmediate(true);
valueSlider.addValueChangeListener(event -> {
if (!updatingColors) {
- float hue = (Float.parseFloat(hueSlider.getValue().toString()))
+ float hue = Float.parseFloat(hueSlider.getValue().toString())
/ 360f;
- float saturation = (Float
- .parseFloat(saturationSlider.getValue().toString()))
- / 100f;
- float value = (Float.parseFloat(event.getValue().toString()))
+ float saturation = Float.parseFloat(
+ saturationSlider.getValue().toString()) / 100f;
+ float value = Float.parseFloat(event.getValue().toString())
/ 100f;
Color newColor = new Color(
@@ -647,7 +640,7 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
@Override
public Color calculate(int x, int y) {
- float h = (x / 220f);
+ float h = x / 220f;
float s = 1f;
float v = 1f;
@@ -699,8 +692,8 @@ public class ColorPickerPopup extends Window implements HasValue<Color> {
@Override
public Color calculate(int x, int y) {
- float saturation = 1f - (y / 220.0f);
- float value = (x / 220.0f);
+ float saturation = 1f - y / 220.0f;
+ float value = x / 220.0f;
float hue = Float.parseFloat(hueSlider.getValue().toString())
/ 360f;
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 3d743f7365..a76f19e0e2 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
@@ -46,9 +46,7 @@ public class ColorPickerPreview extends CssLayout implements HasValue<Color> {
private ColorPickerPreview() {
setStyleName("v-colorpicker-preview");
- setImmediate(true);
field = new TextField();
- field.setImmediate(true);
field.setSizeFull();
field.setStyleName("v-colorpicker-preview-textfield");
field.setData(this);
@@ -162,8 +160,8 @@ public class ColorPickerPreview extends CssLayout implements HasValue<Color> {
}
oldValue = value;
- fireEvent(new ValueChange<>((Component) field.getData(),
- color, event.isUserOriginated()));
+ fireEvent(new ValueChange<>((Component) field.getData(), color,
+ event.isUserOriginated()));
}
} catch (NumberFormatException nfe) {
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 3822251de3..b13499983e 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
@@ -19,7 +19,6 @@ import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.File;
-import java.lang.reflect.Field;
import java.nio.charset.Charset;
import java.util.Locale;
@@ -83,7 +82,6 @@ public class AbstractComponentDeclarativeTest
component.setComponentError(new UserError("<div>test-error</div>",
com.vaadin.server.AbstractErrorMessage.ContentMode.HTML,
ErrorLevel.ERROR));
- component.setImmediate(true);
testRead(design, component);
testWrite(design, component);
}
@@ -103,8 +101,6 @@ public class AbstractComponentDeclarativeTest
component = (AbstractComponent) Design
.read(new ByteArrayInputStream(
design[i].getBytes(Charset.forName("UTF-8"))));
- assertEquals(immediate[i], component.isImmediate());
- assertEquals(explicitImmediate[i], getExplicitImmediate(component));
}
}
@@ -246,15 +242,4 @@ public class AbstractComponentDeclarativeTest
return node;
}
- private Boolean getExplicitImmediate(AbstractComponent component) {
- try {
- Field immediate = AbstractComponent.class
- .getDeclaredField("explicitImmediateValue");
- immediate.setAccessible(true);
- return (Boolean) immediate.get(component);
- } catch (Exception e) {
- throw new RuntimeException(
- "Getting the field explicitImmediateValue failed.");
- }
- }
}
diff --git a/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java b/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java
index f077e540ab..bcf2885989 100644
--- a/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java
+++ b/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java
@@ -33,8 +33,6 @@ public class AbstractComponentState extends SharedState {
public String width = "";
public boolean readOnly = false;
@NoLayout
- public boolean immediate = false;
- @NoLayout
public String description = "";
// Note: for the caption, there is a difference between null and an empty
// string!
diff --git a/uitest/src/main/java/com/vaadin/tests/TestDateField.java b/uitest/src/main/java/com/vaadin/tests/TestDateField.java
index c3d96a6214..c0df8484ec 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestDateField.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestDateField.java
@@ -52,7 +52,6 @@ public class TestDateField extends CustomComponent {
df.setCaption("DateField caption " + df);
df.setDescription("DateField description " + df);
df.setComponentError(errorMsg);
- df.setImmediate(true);
// FIXME: bug #1138 this makes datefield to render with unknown
// component (UIDL tree debug)
df.addStyleName("thisShouldBeHarmless");
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java b/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java
index c23413a87d..52cf961c85 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -95,7 +95,6 @@ public class TestForWindowing extends CustomComponent {
s.setMax(13);
s.setMin(12);
s.setResolution(2);
- s.setImmediate(true);
// s.setOrientation(Slider.ORIENTATION_VERTICAL);
// s.setArrows(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java b/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java
deleted file mode 100644
index 2e76ed460e..0000000000
--- a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.vaadin.tests.application;
-
-import java.lang.reflect.Field;
-import java.util.Map;
-import java.util.Set;
-
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.components.AbstractTestUIWithLog;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.ConnectorTracker;
-import com.vaadin.ui.Window;
-
-public class ResynchronizeAfterAsyncRemoval extends AbstractTestUIWithLog {
-
- @Override
- public void setup(VaadinRequest vaadinRequest) {
- final Window window = new Window("Asynchronously removed window");
- // without this, the size info sent in the background removes the
- // window immediately after showing it, making the test fail
- setImmediate(false);
- window.center();
-
- // The window will enqueue a non-immediate message reporting its current
- // position.
- addWindow(window);
-
- // Remove window immediately when the current response is sent
- runAfterResponse(new Runnable() {
- @Override
- public void run() {
- removeWindow(window);
- }
- });
-
- // Clicking the button will trigger sending the window coordinates, but
- // the window is already removed at that point.
- addComponent(new Button("Am I dirty?", new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- log("Window removed: " + (window.getParent() == null));
-
- boolean dirty = getUI().getConnectorTracker()
- .isDirty(event.getButton());
- log("Dirty: " + dirty);
- }
- }));
- addComponent(new Button("Log unregistered connector count",
- new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- logUnregisteredConnectorCount();
- }
- }));
- }
-
- private void logUnregisteredConnectorCount() {
- int count = 0;
-
- Map<Integer, Set<String>> unregisterIdMap = getUnregisterIdMap();
- for (Set<String> set : unregisterIdMap.values()) {
- count += set.size();
- }
- log("syncId: " + getConnectorTracker().getCurrentSyncId());
- log("Unregistered connector count: " + count);
- }
-
- @SuppressWarnings("unchecked")
- private Map<Integer, Set<String>> getUnregisterIdMap() {
- try {
- ConnectorTracker tracker = getConnectorTracker();
- Field field = tracker.getClass()
- .getDeclaredField("syncIdToUnregisteredConnectorIds");
- field.setAccessible(true);
- return (Map<Integer, Set<String>>) field.get(tracker);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-} \ No newline at end of file
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 de0f70ef88..e18fabee5b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
@@ -228,8 +228,6 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
* when overriding.
*/
protected void createActions() {
- createBooleanAction("Immediate", CATEGORY_STATE, true,
- immediateCommand);
createBooleanAction("Enabled", CATEGORY_STATE, true, enabledCommand);
createBooleanAction("Readonly", CATEGORY_STATE, false, readonlyCommand);
createBooleanAction("Visible", CATEGORY_STATE, true, visibleCommand);
@@ -543,7 +541,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
}
protected boolean isSelected(MenuItem item) {
- return (item.getIcon() != null);
+ return item.getIcon() != null;
}
private <VALUETYPE> MenuBar.Command singleSelectMenuCommand(
@@ -686,8 +684,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends
Registration registration;
@Override
- public void execute(T c, Boolean enabled,
- Object data) {
+ public void execute(T c, Boolean enabled, Object data) {
if (enabled) {
registration = addListener.apply(c);
} else if (registration != null) {
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 bf5ef2df13..8dce9c73e2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
@@ -82,17 +82,14 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent>
/* COMMANDS */
- protected Command<T, String> widthCommand = (t, value, data) -> t.setWidth(
- value);
+ protected Command<T, String> widthCommand = (t, value, data) -> t
+ .setWidth(value);
protected Command<T, String> heightCommand = (t, value, data) -> t
.setHeight(value);
protected Command<T, Boolean> enabledCommand = (c, enabled, data) -> c
.setEnabled(enabled);
- protected Command<T, Boolean> immediateCommand = (c, immediate, data) -> c
- .setImmediate(immediate);
-
protected Command<T, Boolean> errorIndicatorCommand = (c, enabled,
data) -> {
if (enabled) {
@@ -131,8 +128,8 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent>
protected Command<T, Boolean> visibleCommand = (c, enabled, data) -> c
.setVisible(enabled);
- protected Command<T, Resource> iconCommand = (c, value, data) -> c.setIcon(
- value);
+ protected Command<T, Resource> iconCommand = (c, value, data) -> c
+ .setIcon(value);
protected Command<T, String> captionCommand = (c, value, data) -> c
.setCaption(value);
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 ab63c2ae42..1010a42e7d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
@@ -113,7 +113,6 @@ public abstract class ComponentTestCase<T extends AbstractComponent>
event -> doCommand(command, event.getValue()));
checkBox.setValue(initialState);
- checkBox.setImmediate(true);
checkBox.setId("checkboxaction-" + caption);
// Set default value for all components
@@ -135,7 +134,6 @@ public abstract class ComponentTestCase<T extends AbstractComponent>
});
button.setId("buttonaction-" + caption);
- button.setImmediate(true);
return button;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java b/uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java
deleted file mode 100644
index 8b71c537fb..0000000000
--- a/uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.vaadin.tests.components;
-
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.ui.Notification;
-
-public class OutOfSync extends AbstractReindeerTestUI {
-
- @Override
- protected void setup(VaadinRequest request) {
- // Without this, there is an extra request from the UI that changes the
- // request sequence compared to what the test expects
- setImmediate(false);
-
- Button b = new Button("Click me after 1s to be out of sync");
- b.addClickListener(new ClickListener() {
-
- @Override
- public void buttonClick(ClickEvent event) {
- Notification.show("This code will never be reached");
- }
- });
- setContent(b);
- Thread t = new Thread(new Runnable() {
-
- @Override
- public void run() {
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- // Remove button but prevent repaint -> causes out of sync
- // issues
- getSession().lock();
- try {
- setContent(null);
- getConnectorTracker().markClean(OutOfSync.this);
- } finally {
- getSession().unlock();
- }
- }
- });
- t.start();
- }
-
- @Override
- protected String getTestDescription() {
- return "Click the button after 1s when it has been removed server side (causing synchronization problems)";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 10780;
- }
-
-}
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 a440b36d59..c37bd5b144 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
@@ -41,7 +41,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI {
@Override
protected void setup(VaadinRequest request) {
mainLayout = new AbsoluteLayout();
- mainLayout.setImmediate(true);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
@@ -70,7 +69,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI {
// btnLogin
Button btnLogin = new Button();
btnLogin.setCaption("Login");
- btnLogin.setImmediate(false);
btnLogin.setWidth("-1px");
btnLogin.setHeight("-1px");
btnLogin.addClickListener(new Button.ClickListener() {
@@ -112,7 +110,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI {
GridLayout gridButtons = new GridLayout(2, 3);
Button btn1 = new Button("Button one");
- btn1.setImmediate(true);
btn1.addClickListener(new Button.ClickListener() {
@Override
@@ -122,7 +119,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI {
gridButtons.addComponent(btn1, 0, 0);
Button btn2 = new Button("Button two");
- btn2.setImmediate(true);
btn2.addClickListener(new Button.ClickListener() {
@Override
@@ -132,7 +128,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI {
gridButtons.addComponent(btn2, 0, 1);
Button btn3 = new Button("Button three");
- btn3.setImmediate(true);
btn3.addClickListener(new Button.ClickListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java
index 5424efc2cb..4bde83dff2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java
@@ -24,22 +24,18 @@ public class EnableState extends AbstractTestCase {
button.setEnabled(enabled);
// button.requestRepaint();
});
- enable.setImmediate(true);
CheckBox caption = new CheckBox("Toggle button caption", true);
caption.addValueChangeListener(
event -> button.setCaption(button.getCaption() + "+"));
- caption.setImmediate(true);
CheckBox visible = new CheckBox("Toggle panel visibility", true);
visible.addValueChangeListener(
event -> panel.setVisible(event.getValue()));
- visible.setImmediate(true);
CheckBox panelEnable = new CheckBox("Toggle panel enabled", true);
panelEnable.addValueChangeListener(
event -> panel.setEnabled(event.getValue()));
- panelEnable.setImmediate(true);
mainWindow.addComponent(enable);
mainWindow.addComponent(caption);
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 71fc98c504..175ee9db67 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
@@ -17,14 +17,14 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.TextField;
-public class RequiredIndicatorForFieldsWithoutCaption extends AbstractReindeerTestUI {
+public class RequiredIndicatorForFieldsWithoutCaption
+ extends AbstractReindeerTestUI {
private Set<Field> fields = new HashSet<>();
@Override
protected void setup(VaadinRequest request) {
CheckBox required = new CheckBox("Fields required", true);
- required.setImmediate(true);
required.addValueChangeListener(event -> {
boolean newRequired = event.getValue();
for (Field f : fields) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java
index 1b6a81551a..b5ed6a3461 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java
@@ -44,7 +44,6 @@ public class ButtonMouseDetails extends TestBase {
getLayout().setSpacing(true);
Button button = new Button("CLICK ME!", clickListener);
- button.setImmediate(true);
addComponent(button);
addComponent(out);
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 44e8fc3ecf..fbe073a4b2 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
@@ -49,7 +49,6 @@ public class ButtonUpdateAltText extends AbstractReindeerTestUI {
addComponent(btn);
final CheckBox enable = new CheckBox("Enable alt text", true);
- enable.setImmediate(true);
enable.addValueChangeListener(event -> {
if (event.getValue()) {
btn.setIconAlternateText("alt text");
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 b099de70e5..8393cc4d94 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
@@ -207,7 +207,7 @@ public class CalendarTest extends UI {
setLocale(defaultLocale);
}
- if (parameters.containsKey(("secondsResolution"))) {
+ if (parameters.containsKey("secondsResolution")) {
useSecondResolution = true;
}
@@ -437,7 +437,6 @@ public class CalendarTest extends UI {
private void initHideWeekEndButton() {
hideWeekendsButton = new CheckBox("Hide weekends");
- hideWeekendsButton.setImmediate(true);
hideWeekendsButton.addValueChangeListener(
event -> setWeekendsHidden(hideWeekendsButton.getValue()));
}
@@ -457,14 +456,12 @@ public class CalendarTest extends UI {
private void initReadOnlyButton() {
readOnlyButton = new CheckBox("Read-only mode");
- readOnlyButton.setImmediate(true);
readOnlyButton.addValueChangeListener(event -> calendarComponent
.setReadOnly(readOnlyButton.getValue()));
}
private void initDisabledButton() {
disabledButton = new CheckBox("Disabled");
- disabledButton.setImmediate(true);
disabledButton.addValueChangeListener(event -> calendarComponent
.setEnabled(!disabledButton.getValue()));
}
@@ -534,7 +531,6 @@ public class CalendarTest extends UI {
private CheckBox createCheckBox(String caption) {
CheckBox cb = new CheckBox(caption);
- cb.setImmediate(true);
return cb;
}
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
deleted file mode 100644
index 7cd127f896..0000000000
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.checkbox;
-
-import com.vaadin.data.HasValue;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.components.AbstractReindeerTestUI;
-import com.vaadin.ui.CheckBox;
-import com.vaadin.ui.Label;
-
-public class CheckBoxImmediate extends AbstractReindeerTestUI {
- private int count = 0;
-
- @Override
- protected void setup(VaadinRequest request) {
- final Label status = new Label("Events received: " + count);
- status.setId("count");
- addComponent(status);
-
- CheckBox cb = new CheckBox("Non-immediate");
- HasValue.ValueChangeListener<Boolean> listener = event -> {
- count++;
- status.setValue("Events received: " + count);
- };
- cb.addValueChangeListener(listener);
- cb.setImmediate(false);
- addComponent(cb);
-
- cb = new CheckBox("Immediate");
- cb.addValueChangeListener(listener);
- cb.setImmediate(true);
- addComponent(cb);
- }
-
- @Override
- protected String getTestDescription() {
- return "Test for verifying that a non-immediate CheckBox does not send value change to server immediately.";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 18102;
- }
-
-}
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 2b9c2a38a2..e8b99258f7 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
@@ -227,7 +227,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI {
rgbVisible = event.getValue();
setPopupVisibilities();
});
- rgbBox.setImmediate(true);
rgbBox.setId("rgbBox");
optLayout.addComponent(rgbBox);
@@ -236,7 +235,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI {
hsvVisible = event.getValue();
setPopupVisibilities();
});
- hsvBox.setImmediate(true);
hsvBox.setId("hsvBox");
optLayout.addComponent(hsvBox);
@@ -245,7 +243,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI {
swaVisible = event.getValue();
setPopupVisibilities();
});
- swaBox.setImmediate(true);
swaBox.setId("swaBox");
optLayout.addComponent(swaBox);
@@ -254,7 +251,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI {
historyVisible = event.getValue();
setPopupVisibilities();
});
- hisBox.setImmediate(true);
hisBox.setId("hisBox");
optLayout.addComponent(hisBox);
@@ -263,7 +259,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI {
txtfieldVisible = event.getValue();
setPopupVisibilities();
});
- txtBox.setImmediate(true);
txtBox.setId("txtBox");
optLayout.addComponent(txtBox);
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 7514ee850b..65c7592f03 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
@@ -30,7 +30,6 @@ public class ComboBoxCursorPositionReset extends AbstractReindeerTestUI {
setContent(root);
ComboBox<String> combo = new ComboBox<>();
- combo.setImmediate(true);
root.addComponent(combo);
combo.setItems("Hello World", "Please click on the text");
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 adfb120409..14cf564d8d 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
@@ -25,7 +25,6 @@ public class ComboBoxParentDisable extends AbstractTestUIWithLog {
combo.setItems("Item 1", "Item 2", "Item 3", "Item 4");
combo.addValueChangeListener(
event -> log.log("you made a selection change"));
- combo.setImmediate(true);
Button btn1 = new Button("Click me");
btn1.addClickListener(event -> log.log("you clicked me"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java
index 06d2d72b80..720780bb3b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java
@@ -23,7 +23,6 @@ public class ComboBoxResetValue extends AbstractReindeerTestUI {
final ComboBox cbNullSelectionNotAllowed = getComboBoxWithNullSelectionNotAllowed();
Button b = new Button("Reset");
- b.setImmediate(true);
b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
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 98ddb6be82..8072db9de4 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
@@ -11,7 +11,6 @@ public class ComboboxPrimaryStyleNames extends TestBase {
protected void setup() {
final ComboBox<String> box = new ComboBox(null,
DataSource.create("Value 1", "Value 2", "Value 3", "Value 4"));
- box.setImmediate(true);
box.setPrimaryStyleName("my-combobox");
addComponent(box);
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 a3d6546853..a9a76506e9 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
@@ -76,7 +76,6 @@ public class Comboboxes extends ComponentTestCase<ComboBox> {
addTestComponent(s8);
ComboBox<StringBean> s9 = new PageLength0ComboBox();
- s9.setImmediate(true);
s9.setCaption("Pagelength 0");
populate(s9, 15);
s9.setItemCaptionGenerator(StringBean::getValue);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java
index 3a3a6bb3ea..c9ab24011a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java
@@ -19,7 +19,6 @@ public class RemovalOfSelectedIcon extends TestBase {
addComponent(cb2);
Button btClear = new Button("Clear button");
- btClear.setImmediate(true);
btClear.addClickListener(new Button.ClickListener() {
@Override
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 f28ad7b104..8403f60ce6 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
@@ -145,7 +145,6 @@ public class CustomDateFormats extends TestBase {
df.setLocale(locale);
df.setWidth("300px");
df.setDateFormat(pattern);
- df.setImmediate(true);
String debugId = pattern.replace('/', 'X');
// only certain characters are allowed in debug IDs
debugId = debugId.replaceAll("[^-a-zA-Z .'_]", "X");
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 51a117f78f..fdbd945c3c 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
@@ -37,7 +37,6 @@ public class DateFieldChangeResolution extends AbstractReindeerTestUI {
final AbstractDateField dateField = new DateField("Enter date");
dateField.setResolution(Resolution.YEAR);
dateField.setId(DATEFIELD_ID);
- dateField.setImmediate(true);
addComponent(dateField);
Label l = new Label("Select resolution");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java
index 0542961260..60a84dd679 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java
@@ -27,7 +27,6 @@ public class DateFieldIsValid extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
final AbstractDateField dateField = new TestDateField("Insert Date: ");
- dateField.setImmediate(true);
dateField.setDateFormat(pattern);
dateField.addValueChangeListener(event -> log("valueChange: value: "
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 dceb6f1bb9..e53403dbca 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
@@ -70,9 +70,7 @@ public class DateFieldRangeValidation extends TestBase {
"From inclusive", bi.getItemProperty("fromInclusive"));
CheckBox toInclusive = new CheckBoxWithPropertyDataSource(
"To inclusive", bi.getItemProperty("toInclusive"));
- fromInclusive.setImmediate(true);
fromInclusive.addValueChangeListener(refreshField);
- toInclusive.setImmediate(true);
toInclusive.addValueChangeListener(refreshField);
PopupDateField toField = createDateField();
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 da75872d4a..cfd46f11b4 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
@@ -13,7 +13,6 @@ import com.vaadin.tests.components.TestDateField;
import com.vaadin.ui.AbstractDateField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.CheckBox;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.InlineDateField;
@@ -35,7 +34,6 @@ public class DateFieldRanges extends AbstractReindeerTestUI {
private AbstractDateField fromRange = new TestDateField("Range start");
private AbstractDateField toRange = new TestDateField("Range end");
private AbstractDateField valueDF = new TestDateField("Value");
- private CheckBox immediateCB = new CheckBox("Immediate");
private Button recreate = new Button("Recreate static datefields");
private Button clearRangeButton = new Button("Clear range");
@@ -73,33 +71,23 @@ public class DateFieldRanges extends AbstractReindeerTestUI {
});
fromRange.setValue(null);
- fromRange.setImmediate(true);
fromRange.addValueChangeListener(event -> {
inlineDynamicDateField.setRangeStart(fromRange.getValue());
dynamicDateField.setRangeStart(fromRange.getValue());
});
toRange.setValue(null);
- toRange.setImmediate(true);
toRange.addValueChangeListener(event -> {
inlineDynamicDateField.setRangeEnd(toRange.getValue());
dynamicDateField.setRangeEnd(toRange.getValue());
});
valueDF.setValue(null);
- valueDF.setImmediate(true);
valueDF.addValueChangeListener(event -> {
inlineDynamicDateField.setValue(valueDF.getValue());
dynamicDateField.setValue(valueDF.getValue());
});
- immediateCB.setValue(true);
- immediateCB.setImmediate(true);
- immediateCB.addValueChangeListener(event -> {
- inlineDynamicDateField.setImmediate(immediateCB.getValue());
- dynamicDateField.setImmediate(immediateCB.getValue());
- });
-
recreate.addClickListener(new Button.ClickListener() {
@Override
@@ -132,7 +120,6 @@ public class DateFieldRanges extends AbstractReindeerTestUI {
fromRange.setId("fromRange");
toRange.setId("toRange");
valueDF.setId("valueDF");
- immediateCB.setId("immediateCB");
recreate.setId("recreate");
clearRangeButton.setId("clearRangeButton");
dynamicDateField.setId("dynamicDateField");
@@ -162,7 +149,6 @@ public class DateFieldRanges extends AbstractReindeerTestUI {
hl.addComponent(fromRange);
hl.addComponent(toRange);
hl.addComponent(valueDF);
- hl.addComponent(immediateCB);
hl.addComponent(recreate);
hl.addComponent(clearRangeButton);
addComponent(hl);
@@ -227,14 +213,11 @@ public class DateFieldRanges extends AbstractReindeerTestUI {
LocalDate toVal = toRange.getValue();
LocalDate value = valueDF.getValue();
Resolution r = (Resolution) resoSelect.getValue();
- boolean immediate = immediateCB.getValue();
df.setValue(value);
df.setResolution(r);
df.setRangeStart(fromVal);
df.setRangeEnd(toVal);
- df.setImmediate(immediate);
-
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java
index 53f8bb1cb2..5eccb02522 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java
@@ -67,20 +67,16 @@ public class DateFieldUnparsableDate extends TestBase {
protected void setup() {
MyDateField df = new MyDateField(
"Returns the old value for invalid dates");
- df.setImmediate(true);
addComponent(df);
MyDateField2 df2 = new MyDateField2("Returns empty for invalid dates");
- df2.setImmediate(true);
addComponent(df2);
MyDateField3 df3 = new MyDateField3(
"Throws an exception for invalid dates");
- df3.setImmediate(true);
addComponent(df3);
MyDateField4 df4 = new MyDateField4("Can convert 'today'");
- df4.setImmediate(true);
addComponent(df4);
}
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 e484f19f3d..6b28c9a700 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
@@ -37,11 +37,6 @@ public class DisabledParentLayout extends AbstractReindeerTestUI {
final VerticalLayout pane = new VerticalLayout();
AbstractDateField dateField = new TestDateField();
- // If the field is immediate, the UI behaves differently (the value is
- // updated and an error is indicated earlier instead of showing the date
- // selector on the first click as the test expects. Keeping as
- // non-immediate to test the old expected behavior.
- dateField.setImmediate(false);
pane.addComponent(dateField);
content.addComponent(pane);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java
index df2faec965..395e682089 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java
@@ -113,7 +113,6 @@ public class LegacyDateFieldRanges extends AbstractReindeerTestUI {
});
immediateCB.setValue(true);
- immediateCB.setImmediate(true);
immediateCB.addValueChangeListener(event -> {
inlineDynamicDateField.setImmediate(immediateCB.getValue());
dynamicDateField.setImmediate(immediateCB.getValue());
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 a9d978c9e4..ea503f4284 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
@@ -35,7 +35,6 @@ public class LenientMode extends TestBase
df.setLocale(new Locale("fi"));
df.setResolution(Resolution.DAY);
df.setLenient(true);
- df.setImmediate(true);
df.setValue(d);
AbstractDateField df2 = new TestDateField("Normal ");
@@ -43,7 +42,6 @@ public class LenientMode extends TestBase
df2.setResolution(Resolution.DAY);
// df2.setLenient(false);
df2.setValue(null);
- df2.setImmediate(true);
df2.setValue(d);
addComponent(df);
@@ -55,14 +53,12 @@ public class LenientMode extends TestBase
df = new TestDateField("Lenient with time");
df.setLocale(new Locale("fi"));
df.setLenient(true);
- df.setImmediate(true);
df.setValue(d);
df2 = new TestDateField("Normal with time");
df2.setLocale(new Locale("fi"));
// df2.setLenient(false);
df2.setValue(null);
- df2.setImmediate(true);
df2.setValue(d);
addComponent(df);
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 da2fad276c..e0158f45fe 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
@@ -5,7 +5,6 @@ import java.time.LocalDate;
import com.vaadin.shared.ui.datefield.Resolution;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
-import com.vaadin.ui.CheckBox;
import com.vaadin.ui.DateField;
import com.vaadin.ui.InlineDateField;
@@ -19,7 +18,6 @@ public class LowResolution extends TestBase {
dateField.setResolution(Resolution.MONTH);
dateField.addValueChangeListener(event -> getMainWindow()
.showNotification("Date now" + event.getValue()));
- dateField.setImmediate(true);
getLayout().addComponent(dateField);
final DateField dateField3 = new DateField();
@@ -27,7 +25,6 @@ public class LowResolution extends TestBase {
dateField3.setResolution(Resolution.YEAR);
dateField3.addValueChangeListener(event -> getMainWindow()
.showNotification("Date now" + event.getValue()));
- dateField3.setImmediate(true);
getLayout().addComponent(dateField3);
final InlineDateField dateField2 = new InlineDateField();
@@ -35,20 +32,8 @@ public class LowResolution extends TestBase {
dateField2.setResolution(Resolution.MONTH);
dateField2.addValueChangeListener(event -> getMainWindow()
.showNotification("Date now" + event.getValue()));
- dateField2.setImmediate(true);
getLayout().addComponent(dateField2);
- CheckBox immediate = new CheckBox(
- "Immediate (use sync button to change fields) ");
- immediate.setValue(true);
- immediate.addListener(event -> {
- boolean newImmediate = !dateField.isImmediate();
- dateField.setImmediate(newImmediate);
- dateField2.setImmediate(newImmediate);
- dateField3.setImmediate(newImmediate);
- });
-
- getLayout().addComponent(immediate);
getLayout().addComponent(new Button("sync"));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java
index ee9c385b05..8958f024de 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java
@@ -38,7 +38,6 @@ public class DragAndDropDisable extends AbstractReindeerTestUI {
final CheckBox enabled = new CheckBox("Enabled", true);
addComponent(enabled);
- enabled.setImmediate(true);
enabled.addValueChangeListener(
event -> dnd.setEnabled(event.getValue()));
@@ -72,7 +71,6 @@ public class DragAndDropDisable extends AbstractReindeerTestUI {
final CheckBox enabled = new CheckBox("Enabled", true);
addComponent(enabled);
- enabled.setImmediate(true);
enabled.addValueChangeListener(
event -> dnd.setEnabled(event.getValue()));
@@ -116,7 +114,6 @@ public class DragAndDropDisable extends AbstractReindeerTestUI {
});
final CheckBox enabled = new CheckBox("Enabled", true);
addComponent(enabled);
- enabled.setImmediate(true);
enabled.addValueChangeListener(
event -> tbl.setEnabled(event.getValue()));
}
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 a93f3814d4..8a3c009d46 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,4 +1,4 @@
-/*
+/*
* Copyright 2000-2016 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -17,8 +17,8 @@ package com.vaadin.tests.components.formlayout;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
-import com.vaadin.ui.FormLayout;
import com.vaadin.ui.DateField;
+import com.vaadin.ui.FormLayout;
public class FormLayoutErrorHover extends AbstractReindeerTestUI {
@@ -26,7 +26,6 @@ public class FormLayoutErrorHover extends AbstractReindeerTestUI {
protected void setup(VaadinRequest request) {
FormLayout formLayout = new FormLayout();
DateField fromDate = new DateField("Date");
- fromDate.setImmediate(true);
formLayout.addComponent(fromDate);
addComponent(formLayout);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java
index da4d77e487..368c6ac983 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java
@@ -60,14 +60,12 @@ public class NestedFormLayouts extends AbstractReindeerTestUI {
final CheckBox spacingCheckBox = new CheckBox("Spacings", false);
spacingCheckBox.setId("spacings");
- spacingCheckBox.setImmediate(true);
spacingCheckBox.addValueChangeListener(
event -> setLayoutSpacing(spacingCheckBox.getValue()));
addComponent(spacingCheckBox);
final CheckBox marginCheckBox = new CheckBox("Margins", false);
marginCheckBox.setId("margins");
- marginCheckBox.setImmediate(true);
marginCheckBox.addValueChangeListener(
event -> setLayoutMargin(marginCheckBox.getValue()));
addComponent(marginCheckBox);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java
index eb95470db2..b890441164 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java
@@ -39,14 +39,11 @@ public class GridLayoutExpandRatio extends AbstractReindeerTestUI {
gridLayout = new GridLayout(ROWS, COLS);
gridLayout.setHideEmptyRowsAndColumns(true);
- layout.setImmediate(true);
- gridLayout.setImmediate(true);
gridLayout2 = new GridLayout(4, 4);
gridLayout2.setHideEmptyRowsAndColumns(true);
for (int i = 0; i < ROWS; i++) {
for (int j = 0; j < COLS; j++) {
Label label = new Label("Slot " + i + " " + j);
- label.setImmediate(true);
labels[i][j] = label;
gridLayout.addComponent(label, j, i);
if (!(i == 2 || j == 2)) {
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 ef01bac0b0..9bd5275152 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
@@ -44,7 +44,6 @@ public class GridLayoutScrollPosition extends AbstractReindeerTestUI {
"Hide / Show toggleable components");
visibilityToggleCheckBox.setId("visibility-toggle");
visibilityToggleCheckBox.setHeight("2000px");
- visibilityToggleCheckBox.setImmediate(true);
visibilityToggleCheckBox.setValue(false); // Initially unchecked
gridLayout.addComponent(visibilityToggleCheckBox);
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 8d9f9b0c89..29c226fd8c 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
@@ -50,7 +50,6 @@ public class JavaScriptResizeListener extends AbstractReindeerTestUI {
}));
addComponent(new CheckBox("Listener active") {
{
- setImmediate(true);
addValueChangeListener(event -> resizeJsComponent
.setListenerEnabled(event.getValue()));
}
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 df2fc4b011..f81eea8746 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
@@ -51,25 +51,21 @@ public class AudioTest extends TestBase {
checkBox.setValue(audio.isShowControls());
checkBox.addValueChangeListener(
event -> audio.setShowControls(event.getValue()));
- checkBox.setImmediate(true);
addComponent(checkBox);
checkBox = new CheckBox("HtmlContentAllowed");
checkBox.setValue(audio.isHtmlContentAllowed());
checkBox.addValueChangeListener(
event -> audio.setHtmlContentAllowed(event.getValue()));
- checkBox.setImmediate(true);
addComponent(checkBox);
checkBox = new CheckBox("muted");
checkBox.setValue(audio.isMuted());
checkBox.addValueChangeListener(
event -> audio.setMuted(event.getValue()));
- checkBox.setImmediate(true);
addComponent(checkBox);
checkBox = new CheckBox("autoplay");
checkBox.setValue(audio.isAutoplay());
checkBox.addValueChangeListener(
event -> audio.setAutoplay(event.getValue()));
- checkBox.setImmediate(true);
addComponent(checkBox);
Button b = new Button("Change", new Button.ClickListener() {
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 b3aa364364..ce231aad3b 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
@@ -36,7 +36,6 @@ public class ReadOnlyOptionGroup extends AbstractReindeerTestUI {
optionGroup.setNewItemsAllowed(true);
final CheckBox readOnlyCheckbox = new CheckBox("read-only");
- readOnlyCheckbox.setImmediate(true);
readOnlyCheckbox.addValueChangeListener(
event -> optionGroup.setReadOnly(readOnlyCheckbox.getValue()));
readOnlyCheckbox.setValue(Boolean.TRUE);
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 8ef5608fce..61512eabbf 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
@@ -102,7 +102,6 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
header.addComponent(title);
final CheckBox vertical = new CheckBox("Vertical", !horizontal);
- vertical.setImmediate(true);
vertical.addValueChangeListener(event -> {
view.removeAllComponents();
@@ -200,13 +199,11 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
final CheckBox margin = new CheckBox("Margin", false);
margin.addValueChangeListener(event -> l.setMargin(event.getValue()));
- margin.setImmediate(true);
layout.addComponent(margin);
layout.addComponent(margin);
final CheckBox spacing = new CheckBox("Spacing", false);
spacing.addValueChangeListener(event -> l.setSpacing(event.getValue()));
- spacing.setImmediate(true);
layout.addComponent(spacing);
// Cell controls
@@ -238,13 +235,12 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
if (target == null) {
return;
}
- l.setComponentAlignment(target, ((Alignment) align.getValue()));
+ l.setComponentAlignment(target, (Alignment) align.getValue());
}
});
cell.addComponent(align);
expand = new CheckBox("Expand");
- expand.setImmediate(true);
expand.setEnabled(false);
expand.addValueChangeListener(event -> {
if (target != null) {
@@ -343,7 +339,6 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
component.addComponent(componentDescription);
componentError = new CheckBox("Error");
- componentError.setImmediate(true);
componentError.setEnabled(false);
componentError.addValueChangeListener(event -> {
if (target != null) {
@@ -354,7 +349,6 @@ public class BoxLayoutTest extends AbstractReindeerTestUI {
component.addComponent(componentError);
componentRequired = new CheckBox("Required");
- componentRequired.setImmediate(true);
componentRequired.setEnabled(false);
componentRequired.addValueChangeListener(event -> {
if (target != null && target instanceof AbstractField) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java
index c563673d19..f1702d6b52 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java
@@ -191,9 +191,6 @@ public class VerticalLayoutWithEmptyLabel extends AbstractReindeerTestUI {
filterFoobarField.setMaxLength(16);
// this.filterFoobarField.setStyleName("pexp-fixed-width");
- // Configure incoming checkbox
- incomingOnlyField.setImmediate(true);
-
// Add filter inputs for phone # and foobar ID
tableControlsLayout.addComponent(filterPhoneField);
tableControlsLayout.addComponent(filterFoobarField);
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 c2ca47ae79..4fc83a96ad 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
@@ -39,7 +39,6 @@ public class BasicPanelTest extends TestBase {
panel.setContent(panelLayout);
final CheckBox heightSelection = new CheckBox("Undefined height");
- heightSelection.setImmediate(true);
heightSelection.addValueChangeListener(event -> {
if (heightSelection.getValue() == Boolean.TRUE) {
panel.setHeight(null);
@@ -66,7 +65,6 @@ public class BasicPanelTest extends TestBase {
panel.setScrollTop(50);
panel.setScrollLeft(50);
- panel.setImmediate(true);
updateLabelText();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java
index 49c5a87860..5b38070607 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java
@@ -2,9 +2,9 @@ package com.vaadin.tests.components.richtextarea;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
+import com.vaadin.ui.RichTextArea;
import com.vaadin.v7.shared.ui.progressindicator.ProgressIndicatorServerRpc;
import com.vaadin.v7.ui.ProgressIndicator;
-import com.vaadin.ui.RichTextArea;
public class RichTextAreaUpdateWhileTyping extends AbstractReindeerTestUI {
@@ -30,7 +30,6 @@ public class RichTextAreaUpdateWhileTyping extends AbstractReindeerTestUI {
rta = new RichTextArea();
rta.setId("rta");
- rta.setImmediate(true);
addComponent(rta);
}
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 6c6952ddb8..188f617106 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
@@ -41,7 +41,6 @@ public class SliderUpdateFromValueChange extends AbstractReindeerTestUI {
slider.markAsDirty();
});
- slider.setImmediate(true);
slider.setWidth(200, Unit.PIXELS);
addComponent(slider);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java
index e5ebef01fa..10d8ea9a85 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java
@@ -23,7 +23,6 @@ public class SplitPanelReversePosition extends TestBase {
final HorizontalSplitPanel hsplit = new HorizontalSplitPanel();
hsplit.setSizeFull();
- hsplit.setImmediate(true);
hsplit.setSplitPosition(100, Sizeable.UNITS_PIXELS, hsplitReversed);
hsplit.addSplitterClickListener(
new HorizontalSplitPanel.SplitterClickListener() {
@@ -40,7 +39,6 @@ public class SplitPanelReversePosition extends TestBase {
final VerticalSplitPanel vsplit = new VerticalSplitPanel();
vsplit.setSizeFull();
- vsplit.setImmediate(true);
vsplit.setSplitPosition(10, Sizeable.UNITS_PERCENTAGE, vsplitReversed);
vsplit.addSplitterClickListener(new SplitterClickListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java
index 8f1c70fff6..02789e9319 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java
@@ -15,7 +15,6 @@ public class AddItemToEmptyTable extends TestBase {
protected void setup() {
CheckBox cb = new CheckBox("Set first column width");
cb.setValue(false);
- cb.setImmediate(true);
cb.addValueChangeListener(event -> {
if (event.getValue()) {
rightTable.setColumnWidth("name", 150);
@@ -27,7 +26,6 @@ public class AddItemToEmptyTable extends TestBase {
cb = new CheckBox("Set second column width");
cb.setValue(true);
- cb.setImmediate(true);
cb.addValueChangeListener(event -> {
if (event.getValue()) {
rightTable.setColumnWidth("info", 20);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java
index 3360927310..2d3ac270d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java
@@ -42,7 +42,6 @@ public class ColumnHeaderAlignments extends TestBase {
barTable.setFooterVisible(visible);
bazTable.setFooterVisible(visible);
});
- footers.setImmediate(true);
addComponent(footers);
HorizontalLayout tables = new HorizontalLayout();
fooTable = createTable(null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
index 6bc84db6e9..9bcbd6e2f5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java
@@ -38,12 +38,10 @@ public class DoublesInTable extends TestBase {
@Override
protected void setup() {
editMode = new CheckBox("Edit mode");
- editMode.setImmediate(true);
editMode.addValueChangeListener(
event -> table.setEditable(editMode.getValue()));
useCustomConverters = new CheckBox("Use custom converters");
- useCustomConverters.setImmediate(true);
useCustomConverters.addValueChangeListener(event -> recreateTable());
localeSelect = createLocaleSelect();
@@ -77,23 +75,22 @@ public class DoublesInTable extends TestBase {
}
private static BeanItemContainer<Person> createContainer(int nr) {
- BeanItemContainer<Person> bic = new BeanItemContainer<>(
- Person.class);
+ BeanItemContainer<Person> bic = new BeanItemContainer<>(Person.class);
for (int i = 1; i <= nr; i++) {
Person p = new Person();
p.setFirstName("First " + i);
p.setLastName("Last " + i);
p.setAge(i);
- p.setDeceased((i % 5 - 2) == 0);
+ p.setDeceased(i % 5 - 2 == 0);
p.setEmail("person" + i + "@mail.com");
p.setRent(new BigDecimal(i * 1250.25));
p.setSalary(3000 + i);
- p.setSex((i % 4) == 0 ? Sex.MALE : Sex.FEMALE);
+ p.setSex(i % 4 == 0 ? Sex.MALE : Sex.FEMALE);
p.setBirthDate(new Date(2011 - 1900 - p.getAge(), 11 - 1, 24));
if (i % 42 == 0) {
p.setSex(Sex.UNKNOWN);
}
- String city = "City " + (i / 10);
+ String city = "City " + i / 10;
Country country = Country.FINLAND;
Address address = new Address("Street " + i, 12345 + i * 2, city,
country);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java b/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
index 1b142e5f6b..1460d184dc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java
@@ -83,7 +83,6 @@ public class EditableTableLeak extends TestBase {
@Override
protected void setup() {
addComponent(useFieldFactory);
- useFieldFactory.setImmediate(true);
useFieldFactory.addValueChangeListener(event -> {
if (useFieldFactory.getValue()) {
table.setTableFieldFactory(new CachingFieldFactory());
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 015a8c213a..3c122bc844 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
@@ -137,7 +137,6 @@ public class EmptyRowsWhenScrolling extends UI {
private AbsoluteLayout buildMainLayout() {
// common part: create layout
mainLayout = new AbsoluteLayout();
- mainLayout.setImmediate(false);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
@@ -156,7 +155,6 @@ public class EmptyRowsWhenScrolling extends UI {
private VerticalLayout buildVerticalLayout_1() {
// common part: create layout
verticalLayout_1 = new VerticalLayout();
- verticalLayout_1.setImmediate(false);
verticalLayout_1.setWidth("100.0%");
verticalLayout_1.setHeight("100.0%");
verticalLayout_1.setMargin(false);
@@ -180,7 +178,6 @@ public class EmptyRowsWhenScrolling extends UI {
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
- horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("100.0%");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
@@ -188,7 +185,6 @@ public class EmptyRowsWhenScrolling extends UI {
// btnRefreshTable
setBtnRefreshTable(new Button());
getBtnRefreshTable().setCaption("Reload table row cache");
- getBtnRefreshTable().setImmediate(false);
getBtnRefreshTable().setWidth("-1px");
getBtnRefreshTable().setHeight("-1px");
horizontalLayout_1.addComponent(getBtnRefreshTable());
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 4ba73268f4..185780606c 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
@@ -46,14 +46,12 @@ public class Footer extends AbstractReindeerTestUI {
options.setSpacing(true);
final CheckBox visible = new CheckBox("Footers Visible", true);
- visible.setImmediate(true);
visible.addValueChangeListener(
event -> table.setFooterVisible(visible.getValue()));
options.addComponent(visible);
final TextField footer1Value = new TextField(null, "Footer1");
- footer1Value.setImmediate(true);
Button footer1Btn = new Button("Change", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -67,7 +65,6 @@ public class Footer extends AbstractReindeerTestUI {
options.addComponent(footer1);
final TextField footer2Value = new TextField(null, "Footer2");
- footer2Value.setImmediate(true);
Button footer2Btn = new Button("Change", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -81,7 +78,6 @@ public class Footer extends AbstractReindeerTestUI {
options.addComponent(footer2);
final TextField footer3Value = new TextField(null, "Footer3");
- footer3Value.setImmediate(true);
Button footer3Btn = new Button("Change", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
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 aa80d15af8..438e102d41 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
@@ -44,14 +44,12 @@ public class FooterClick extends AbstractTestUIWithLog {
});
CheckBox immediateCheckbox = new CheckBox("Immediate");
- immediateCheckbox.setImmediate(true);
immediateCheckbox.setValue(table.isImmediate());
immediateCheckbox.addValueChangeListener(
event -> table.setImmediate(event.getValue()));
CheckBox columnReorderingCheckbox = new CheckBox(
"Column reordering allowed");
- columnReorderingCheckbox.setImmediate(true);
columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed());
columnReorderingCheckbox.addValueChangeListener(
event -> table.setColumnReorderingAllowed(event.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 2325d09192..80a75bdb9d 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
@@ -33,20 +33,17 @@ public class HeaderClick extends AbstractReindeerTestUI {
});
CheckBox immediateCheckbox = new CheckBox("Immediate");
- immediateCheckbox.setImmediate(true);
immediateCheckbox.setValue(table.isImmediate());
immediateCheckbox.addValueChangeListener(
event -> table.setImmediate(event.getValue()));
CheckBox sortEnabledCheckbox = new CheckBox("Sortable");
- sortEnabledCheckbox.setImmediate(true);
sortEnabledCheckbox.setValue(table.isSortEnabled());
sortEnabledCheckbox.addValueChangeListener(
event -> table.setSortEnabled(event.getValue()));
CheckBox columnReorderingCheckbox = new CheckBox(
"Column reordering allowed");
- columnReorderingCheckbox.setImmediate(true);
columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed());
columnReorderingCheckbox.addValueChangeListener(
event -> table.setColumnReorderingAllowed(event.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 8263b481eb..52554e26a4 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
@@ -27,14 +27,12 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog {
table.setFooterVisible(true);
CheckBox immediateCheckbox = new CheckBox("Immediate");
- immediateCheckbox.setImmediate(true);
immediateCheckbox.setValue(table.isImmediate());
immediateCheckbox.addValueChangeListener(
event -> table.setImmediate(event.getValue()));
CheckBox headerClickListenerCheckbox = new CheckBox(
"Header click listener");
- headerClickListenerCheckbox.setImmediate(true);
headerClickListenerCheckbox.addValueChangeListener(
new HasValue.ValueChangeListener<Boolean>() {
@@ -66,7 +64,6 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog {
CheckBox footerClickListenerCheckbox = new CheckBox(
"Footer click listener");
- footerClickListenerCheckbox.setImmediate(true);
footerClickListenerCheckbox.addValueChangeListener(
new HasValue.ValueChangeListener<Boolean>() {
@@ -96,14 +93,12 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog {
footerClickListenerCheckbox.setValue(true);
CheckBox sortEnabledCheckbox = new CheckBox("Sortable");
- sortEnabledCheckbox.setImmediate(true);
sortEnabledCheckbox.setValue(table.isSortEnabled());
sortEnabledCheckbox.addValueChangeListener(
event -> table.setSortEnabled(event.getValue()));
CheckBox columnReorderingCheckbox = new CheckBox(
"Column reordering allowed");
- columnReorderingCheckbox.setImmediate(true);
columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed());
columnReorderingCheckbox.addValueChangeListener(
event -> table.setColumnReorderingAllowed(event.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 2da88f74dd..af894cf61e 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
@@ -22,7 +22,6 @@ public class HeaderPositionWhenSorting extends AbstractReindeerTestUI
@Override
protected void setup(VaadinRequest request) {
CheckBox cb = new CheckBox("Item click listener");
- cb.setImmediate(true);
cb.addValueChangeListener(event -> {
if (event.getValue()) {
table.addItemClickListener(HeaderPositionWhenSorting.this);
@@ -33,7 +32,6 @@ public class HeaderPositionWhenSorting extends AbstractReindeerTestUI
addComponent(cb);
CheckBox cbActionHandler = new CheckBox("Action handler");
- cbActionHandler.setImmediate(true);
cbActionHandler.addValueChangeListener(event -> {
if (event.getValue()) {
table.addActionHandler(HeaderPositionWhenSorting.this);
@@ -45,7 +43,6 @@ public class HeaderPositionWhenSorting extends AbstractReindeerTestUI
CheckBox cbActionHasActions = new CheckBox(
"Action handler has actions");
- cbActionHasActions.setImmediate(true);
cbActionHasActions.addValueChangeListener(event -> {
actionHandlerHasActions = event.getValue();
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 b9e9c2949e..a3f2ddacea 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
@@ -27,7 +27,6 @@ public class HeaderUpdateWhenNoRows extends AbstractReindeerTestUI {
}
});
- showHeaders.setImmediate(true);
showHeaders.setValue(true);
addComponent(showHeaders);
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 5f082080d3..f5e62adfc8 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
@@ -137,7 +137,6 @@ public class ItemClickEvents extends AbstractReindeerTestUI {
CheckBox b = new CheckBox("immediate");
b.setValue(c.isImmediate());
b.addValueChangeListener(event -> c.setImmediate(event.getValue()));
- b.setImmediate(true);
layout.addComponent(b);
b = new CheckBox("selectable");
if (c instanceof Table) {
@@ -149,18 +148,15 @@ public class ItemClickEvents extends AbstractReindeerTestUI {
b.addValueChangeListener(
event -> ((Tree) c).setSelectable(event.getValue()));
}
- b.setImmediate(true);
layout.addComponent(b);
b = new CheckBox("nullsel");
b.setValue(c.isNullSelectionAllowed());
b.addValueChangeListener(
event -> c.setNullSelectionAllowed(event.getValue()));
- b.setImmediate(true);
layout.addComponent(b);
b = new CheckBox("multi");
b.setValue(c.isMultiSelect());
b.addValueChangeListener(event -> c.setMultiSelect(event.getValue()));
- b.setImmediate(true);
layout.addComponent(b);
return layout;
}
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 eedb414070..89b4b46da4 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
@@ -20,7 +20,6 @@ public class TableAndBrowserContextMenu extends TestBase
@Override
public void setup() {
CheckBox cb = new CheckBox("Item click listener");
- cb.setImmediate(true);
cb.addValueChangeListener(event -> {
if (event.getValue()) {
table.addListener(TableAndBrowserContextMenu.this);
@@ -31,7 +30,6 @@ public class TableAndBrowserContextMenu extends TestBase
addComponent(cb);
CheckBox cbActionHandler = new CheckBox("Action handler");
- cbActionHandler.setImmediate(true);
cbActionHandler.addValueChangeListener(event -> {
if (event.getValue()) {
table.addActionHandler(TableAndBrowserContextMenu.this);
@@ -43,7 +41,6 @@ public class TableAndBrowserContextMenu extends TestBase
CheckBox cbActionHasActions = new CheckBox(
"Action handler has actions");
- cbActionHasActions.setImmediate(true);
cbActionHasActions.addValueChangeListener(event -> {
actionHandlerHasActions = event.getValue();
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 bb272ac910..cc741fadc1 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
@@ -47,7 +47,6 @@ public class TableHeightWhenHidingHeaders extends AbstractTestCase {
}
});
showHeaders.setValue(true);
- showHeaders.setImmediate(true);
mainWindow.addComponent(showHeaders);
mainWindow.addComponent(table);
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 9aab0303b6..b2b4bb12cd 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
@@ -29,18 +29,15 @@ public class TableItemDescriptionGeneratorUI extends AbstractReindeerTestUI {
componentDescription
.addValueChangeListener(event -> table.setContainerDataSource(
createContainer(componentDescription.getValue())));
- componentDescription.setImmediate(true);
componentDescription.setValue(true);
tableCellItemDescription = new CheckBox("Tooltip on table cells");
tableCellItemDescription
.addValueChangeListener(event -> table.refreshRowCache());
- tableCellItemDescription.setImmediate(true);
tableCellItemDescription.setValue(true);
tableRowItemDescription = new CheckBox("Tooltip on table Rows");
tableRowItemDescription
.addValueChangeListener(event -> table.refreshRowCache());
- tableRowItemDescription.setImmediate(true);
tableRowItemDescription.setValue(true);
addComponent(componentDescription);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java
index d289798c3d..5f1c8b4283 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java
@@ -10,7 +10,6 @@ public class TableScrollOnFocus extends TestBase {
final Table table = new Table();
final CheckBox chkSelectable = new CheckBox("selectable");
- chkSelectable.setImmediate(true);
chkSelectable.addValueChangeListener(
event -> table.setSelectable(chkSelectable.getValue()));
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 4b68467091..53bb8e25df 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
@@ -91,7 +91,6 @@ public class TableUndefinedSize extends TestBase {
log.log("Column 1 hidden");
}
});
- cb.setImmediate(true);
visibilities.addComponent(cb);
cb = new CheckBox("Column 2");
@@ -106,7 +105,6 @@ public class TableUndefinedSize extends TestBase {
log.log("Column 2 hidden");
}
});
- cb.setImmediate(true);
visibilities.addComponent(cb);
cb = new CheckBox("Column 3");
@@ -122,7 +120,6 @@ public class TableUndefinedSize extends TestBase {
log.log("Column 3 hidden");
}
});
- cb.setImmediate(true);
visibilities.addComponent(cb);
addComponent(log);
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 632facee44..05da1f3f81 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
@@ -92,9 +92,6 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase {
@Override
protected void setup() {
- brokenContainer.setImmediate(true);
- brokenGenerator.setImmediate(true);
- clearTableOnError.setImmediate(true);
clearTableOnError.addValueChangeListener(event -> {
Boolean value = clearTableOnError.getValue();
setErrorHandler(value != null ? value : false);
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 71775c0ad9..9fbb0256b7 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
@@ -35,7 +35,6 @@ public class ValueAfterClearingContainer extends TestBase {
addComponent(table);
final CheckBox multiselect = new CheckBox("Multiselect");
- multiselect.setImmediate(true);
multiselect.setId("multiselect");
multiselect.addValueChangeListener(event -> {
Boolean value = multiselect.getValue();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java
index b393ff3105..8503f82479 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java
@@ -37,7 +37,6 @@ public class Wordwrap extends TestBase {
area2.setCaption("Nonwrapping");
}
});
- onoff.setImmediate(true);
addComponent(onoff);
}
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 374ab40e3f..4b39ed8637 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
@@ -33,7 +33,6 @@ public class SelectionAndCursorPosition extends AbstractReindeerTestUI {
Panel panel = new Panel(fl);
panel.setCaption("Hackers panel");
CheckBox ml = new CheckBox("Multiline");
- ml.setImmediate(true);
// FIXME re-add this when TextArea has been replaced with vaadin8
// version
// ml.addListener(new Property.ValueChangeListener() {
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 cd08db9cd9..7076e6c03e 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
@@ -24,7 +24,6 @@ public class SetTabIndex extends TestBase {
addComponent(field0);
final CheckBox readonly = new CheckBox("Readonly");
- readonly.setImmediate(true);
readonly.addValueChangeListener(event -> {
boolean newReadonly = event.getValue();
field1.setReadOnly(newReadonly);
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 84eefedde1..6329d6fdd0 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
@@ -36,7 +36,7 @@ public class TextFieldFocusAndBlurListeners extends TestBase
TextField tf2 = new TextField("TextField 2",
"Has focus, blur and valuechange listeners");
tf2.setWidth("300px");
- tf2.addValueChangeListener(l -> this.valueChange(tf2));
+ tf2.addValueChangeListener(l -> valueChange(tf2));
tf2.addFocusListener(this);
tf2.addBlurListener(this);
@@ -45,15 +45,14 @@ public class TextFieldFocusAndBlurListeners extends TestBase
TextField tf3 = new TextField("TextField 3",
"Has non-immediate valuechange listener");
tf3.setWidth("300px");
- tf3.addValueChangeListener(l -> this.valueChange(tf3));
+ tf3.addValueChangeListener(l -> valueChange(tf3));
addComponent(tf3);
TextField tf4 = new TextField("TextField 4",
"Has immediate valuechange listener");
tf4.setWidth("300px");
- tf4.setImmediate(true);
- tf4.addValueChangeListener(l -> this.valueChange(tf4));
+ tf4.addValueChangeListener(l -> valueChange(tf4));
addComponent(tf4);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java
index d721fb5a4a..b278afa892 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java
@@ -25,7 +25,6 @@ public class TextFieldInputPromptAndClickShortcut extends TestBase {
button.setClickShortcut(KeyCode.ESCAPE);
final CheckBox inputPromptSelection = new CheckBox("Input prompt");
- inputPromptSelection.setImmediate(true);
inputPromptSelection.addValueChangeListener(event -> {
if (event.getValue()) {
textField.setInputPrompt("Input prompt");
@@ -34,7 +33,6 @@ public class TextFieldInputPromptAndClickShortcut extends TestBase {
}
log.log("Set input prompt: " + textField.getInputPrompt());
});
- inputPromptSelection.setImmediate(true);
addComponent(textField);
addComponent(button);
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 cd1c49c62d..1c75961795 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
@@ -22,7 +22,6 @@ public class TreeConnectors extends TestBase {
protected void setup() {
CheckBox cb = new CheckBox("Connectors");
cb.setValue(false);
- cb.setImmediate(true);
cb.addValueChangeListener(event -> {
if (event.getValue()) {
tree.addStyleName(BaseTheme.TREE_CONNECTORS);
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 9d15e2f3a1..f4d90d6e9b 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
@@ -42,7 +42,6 @@ public class TreeFiltering extends TestBase {
final CheckBox filterType = new CheckBox(
"Include parent when filtering", true);
- filterType.setImmediate(true);
filterType.addValueChangeListener(event -> {
cont.setIncludeParentsWhenFiltering(event.getValue());
ccTree.markAsDirty();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java
index 33408d31db..3bef55450a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java
@@ -39,7 +39,6 @@ public class IdOverrideTest extends AbstractReindeerTestUI {
final IdTestLabel idTestLabelWithId = new IdTestLabel("set id");
idTestLabelWithId.setSizeUndefined();
idTestLabelWithId.setId("set10179");
- idTestLabelWithId.setImmediate(true);
addComponent(idTestLabelWithId);
final Label label = new Label("no id");
@@ -66,7 +65,6 @@ public class IdOverrideTest extends AbstractReindeerTestUI {
}
});
button.setId("toggle");
- button.setImmediate(true);
addComponent(button);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java b/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java
deleted file mode 100644
index cf9eb1b9eb..0000000000
--- a/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.vaadin.tests.components.window;
-
-import com.vaadin.server.Page.BrowserWindowResizeEvent;
-import com.vaadin.server.Page.BrowserWindowResizeListener;
-import com.vaadin.shared.ui.label.ContentMode;
-import com.vaadin.tests.components.AbstractTestCase;
-import com.vaadin.tests.util.Log;
-import com.vaadin.tests.util.LoremIpsum;
-import com.vaadin.ui.CheckBox;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.LegacyWindow;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
-import com.vaadin.ui.Window.ResizeEvent;
-import com.vaadin.ui.Window.ResizeListener;
-
-public class LazyWindowResize extends AbstractTestCase {
-
- private LegacyWindow mainWindow;
- private Window subWindow;
- private CheckBox lazyMode;
- private Log log = new Log(5);
- private CheckBox resizeListenerCheckBox;
-
- protected ResizeListener resizeListener = new ResizeListener() {
-
- @Override
- public void windowResized(ResizeEvent e) {
- log.log("Sub window resized");
- }
- };
-
- protected BrowserWindowResizeListener browserWindowResizeListener = new BrowserWindowResizeListener() {
- @Override
- public void browserWindowResized(BrowserWindowResizeEvent event) {
- log.log("Main window resized");
- }
- };
-
- private CheckBox immediateCheckBox;
-
- @Override
- protected String getDescription() {
- return "Check or uncheck the checkbox to use lazy or eager resize events. Lazy mode uses a small delay before recalculating layout sizes and can be used to speed up resizes in slow UIs.";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 6715;
- }
-
- @Override
- public void init() {
- mainWindow = new LegacyWindow("Resize test");
- setMainWindow(mainWindow);
- VerticalLayout layout = new VerticalLayout();
- layout.setMargin(true);
- subWindow = new Window("Sub window", layout);
- subWindow.setHeight("50%");
- subWindow.setWidth("50%");
- subWindow.center();
- layout.addComponent(new Label(LoremIpsum.get(1000)));
- getMainWindow().addWindow(subWindow);
-
- lazyMode = new CheckBox("Lazy resize");
- lazyMode.setImmediate(true);
- lazyMode.addValueChangeListener(event -> setLazy(lazyMode.getValue()));
-
- resizeListenerCheckBox = new CheckBox("Resize listener");
- resizeListenerCheckBox.setImmediate(true);
- resizeListenerCheckBox.addValueChangeListener(event -> {
- if (resizeListenerCheckBox.getValue()) {
- subWindow.addResizeListener(resizeListener);
- mainWindow.addListener(browserWindowResizeListener);
- } else {
- subWindow.removeResizeListener(resizeListener);
- mainWindow.removeListener(browserWindowResizeListener);
- }
- });
- immediateCheckBox = new CheckBox("Windows immediate");
- immediateCheckBox.setImmediate(true);
- immediateCheckBox.addValueChangeListener(event -> {
- mainWindow.setImmediate(immediateCheckBox.getValue());
- subWindow.setImmediate(immediateCheckBox.getValue());
- });
- mainWindow.addComponent(lazyMode);
- mainWindow.addComponent(resizeListenerCheckBox);
- mainWindow.addComponent(immediateCheckBox);
- mainWindow.addComponent(log);
- mainWindow.addComponent(new Label("<br/><br/>", ContentMode.HTML));
- mainWindow.addComponent(new Label(LoremIpsum.get(10000)));
-
- setLazy(false);
- }
-
- private void setLazy(boolean b) {
- mainWindow.setResizeLazy(b);
- subWindow.setResizeLazy(b);
- }
-
-}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java
deleted file mode 100644
index 3a9b4a9315..0000000000
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.vaadin.tests.components.window;
-
-import com.vaadin.server.Page;
-import com.vaadin.server.Page.BrowserWindowResizeEvent;
-import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.CheckBox;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
-
-public class WindowResizeListener extends TestBase {
-
- @Override
- protected String getDescription() {
- return "Size changes from windows (both sub "
- + "and browsers level) should get back to server."
- + " If size changes, a separate server side event should occur.";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return null;
- }
-
- Window subwin = new ResizeListenerWindow();
-
- @Override
- protected void setup() {
-
- final Label l = new Label();
- getLayout().addComponent(l);
-
- getMainWindow().addListener(new Page.BrowserWindowResizeListener() {
- @Override
- public void browserWindowResized(BrowserWindowResizeEvent event) {
- l.setValue("Current browser window size: "
- + getMainWindow().getBrowserWindowWidth() + " x "
- + getMainWindow().getBrowserWindowHeight());
- }
- });
-
- CheckBox subwindow = new CheckBox("show subwindow");
- subwindow.setImmediate(true);
- subwindow.addValueChangeListener(event -> {
- if (event.getValue()) {
- getMainWindow().addWindow(subwin);
- } else {
- getMainWindow().removeWindow(subwin);
- }
- });
- getLayout().addComponent(subwindow);
-
- CheckBox immediate = new CheckBox("immediate");
- immediate.addValueChangeListener(event -> {
- boolean booleanValue = event.getValue();
- getMainWindow().setImmediate(booleanValue);
- subwin.setImmediate(booleanValue);
- });
- immediate.setImmediate(true);
- immediate.setValue(true);
- getMainWindow().setImmediate(true);
- subwin.setImmediate(true);
- getLayout().addComponent(immediate);
-
- getLayout().addComponent(new Button("Sync"));
-
- }
-}
-
-class ResizeListenerWindow extends Window {
- Label sizeLabel = new Label();
-
- public ResizeListenerWindow() {
- super("Subwindow", new VerticalLayout());
- setWidth("400px");
-
- VerticalLayout hl = (VerticalLayout) getContent();
- hl.setMargin(true);
- hl.addComponent(new Label("Current size: "));
- hl.addComponent(sizeLabel);
-
- addResizeListener(new ResizeListener() {
- @Override
- public void windowResized(ResizeEvent e) {
- updateLabel();
- }
- });
-
- updateLabel();
- }
-
- public void updateLabel() {
- sizeLabel.setValue(getWidth() + getWidthUnits().getSymbol() + " x "
- + getHeight() + getHeightUnits().getSymbol());
- }
-}
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 a423fbef0e..d1e2544257 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
@@ -92,7 +92,6 @@ public class BeanItemContainerFilteringTest extends TestBase {
filterString.getValue().toString(), false, false);
}
});
- cb.setImmediate(true);
vl.addComponent(cb);
nextLabel = new Label();
@@ -112,7 +111,6 @@ public class BeanItemContainerFilteringTest extends TestBase {
nextLabel.setCaption("Next id: " + nextToAdd);
}
});
- addItemButton.setImmediate(true);
vl.addComponent(addItemButton);
final Button addItemAfterButton = new Button("addItemAfter()",
@@ -136,7 +134,6 @@ public class BeanItemContainerFilteringTest extends TestBase {
nextLabel.setCaption("Next id: " + nextToAdd);
}
});
- addItemAfterButton.setImmediate(true);
vl.addComponent(addItemAfterButton);
position = new TextField("Position:", "0");
@@ -162,7 +159,6 @@ public class BeanItemContainerFilteringTest extends TestBase {
nextLabel.setCaption("Next id: " + nextToAdd);
}
});
- addItemAtButton.setImmediate(true);
vl.addComponent(addItemAtButton);
getLayout().addComponent(table);
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 d6d5d3309a..ceaca59143 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java
@@ -59,7 +59,6 @@ public class IndexedContainerFilteringTest extends TestBase {
filterString.getValue().toString(), false, false);
}
});
- cb.setImmediate(true);
vl.addComponent(cb);
nextLabel = new Label();
@@ -81,7 +80,6 @@ public class IndexedContainerFilteringTest extends TestBase {
nextLabel.setCaption("Next id: " + nextToAdd);
}
});
- addItemButton.setImmediate(true);
vl.addComponent(addItemButton);
final Button addItemAfterButton = new Button("addItemAfter()",
@@ -106,7 +104,6 @@ public class IndexedContainerFilteringTest extends TestBase {
nextLabel.setCaption("Next id: " + nextToAdd);
}
});
- addItemAfterButton.setImmediate(true);
vl.addComponent(addItemAfterButton);
position = new TextField("Position:", "0");
@@ -132,7 +129,6 @@ public class IndexedContainerFilteringTest extends TestBase {
nextLabel.setCaption("Next id: " + nextToAdd);
}
});
- addItemAtButton.setImmediate(true);
vl.addComponent(addItemAtButton);
getLayout().addComponent(table);
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 eec30f5b40..6ebffe7029 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
@@ -33,13 +33,11 @@ public class TreeDragStart extends TestBase {
final Tree tree = new Tree("Inventory");
CheckBox checkBox = new CheckBox("Enabled");
- checkBox.setImmediate(true);
checkBox.setValue(true);
checkBox.addValueChangeListener(
event -> tree.setEnabled(!tree.isEnabled()));
addComponent(checkBox);
checkBox = new CheckBox("Drag start");
- checkBox.setImmediate(true);
checkBox.setValue(true);
checkBox.addValueChangeListener(event -> {
if (event.getValue()) {
@@ -99,8 +97,7 @@ public class TreeDragStart extends TestBase {
if (sourceItemId instanceof BeanItem<?>) {
beanItem = (BeanItem<?>) sourceItemId;
} else if (sourceItemId instanceof InventoryObject) {
- beanItem = new BeanItem<>(
- (InventoryObject) sourceItemId);
+ beanItem = new BeanItem<>((InventoryObject) sourceItemId);
}
// Remove the item from the source container and
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java b/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java
index 8a94497686..5c8692ce1c 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java
@@ -16,7 +16,6 @@ public class EmbedSizeTest extends TestBase {
LegacyWindow mainWindow = getMainWindow();
mainWindow.setSizeUndefined();
mainWindow.getContent().setSizeUndefined();
- mainWindow.setImmediate(true);
CheckBox lazyCheckBox = new CheckBox("Lazy resize");
lazyCheckBox.addValueChangeListener(event -> {
@@ -25,7 +24,6 @@ public class EmbedSizeTest extends TestBase {
log.log("Resize lazy: " + resizeLazy);
});
lazyCheckBox.setValue(Boolean.FALSE);
- lazyCheckBox.setImmediate(true);
addComponent(lazyCheckBox);
addComponent(log);
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 77373c723e..b6df3d34c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
@@ -79,7 +79,6 @@ public class CaptionsInLayouts extends AbstractReindeerTestUI {
private Component toggleRequired() {
CheckBox requiredToggle = new CheckBox();
- requiredToggle.setImmediate(true);
requiredToggle.setCaption("Required");
requiredToggle
.addValueChangeListener(event -> setRequired(event.getValue()));
@@ -88,7 +87,6 @@ public class CaptionsInLayouts extends AbstractReindeerTestUI {
private Component toggleIcon() {
CheckBox iconToggle = new CheckBox();
- iconToggle.setImmediate(true);
iconToggle.setCaption("Icons");
iconToggle.addValueChangeListener(event -> setIcon(event.getValue()));
return iconToggle;
@@ -114,7 +112,6 @@ public class CaptionsInLayouts extends AbstractReindeerTestUI {
private Component toggleError() {
CheckBox errorToggle = new CheckBox();
- errorToggle.setImmediate(true);
errorToggle.setCaption("Error");
errorToggle.addValueChangeListener(event -> setError(event.getValue()));
return errorToggle;
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 82752d67d4..b995fe9093 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
@@ -87,7 +87,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component toggleRequired() {
CheckBox requiredToggle = new CheckBox();
- requiredToggle.setImmediate(true);
requiredToggle.setCaption("Required");
requiredToggle
.addValueChangeListener(event -> setRequired(event.getValue()));
@@ -96,7 +95,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component toggleIcon() {
CheckBox iconToggle = new CheckBox();
- iconToggle.setImmediate(true);
iconToggle.setCaption("Icons");
iconToggle.addValueChangeListener(event -> setIcon(event.getValue()));
return iconToggle;
@@ -104,7 +102,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component toggleReadOnly() {
CheckBox readOnlyToggle = new CheckBox();
- readOnlyToggle.setImmediate(true);
readOnlyToggle.setCaption("Read only");
readOnlyToggle
.addValueChangeListener(event -> setReadOnly(event.getValue()));
@@ -114,7 +111,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component toggleEnabled() {
CheckBox enabledToggle = new CheckBox();
- enabledToggle.setImmediate(true);
enabledToggle.setValue(true);
enabledToggle.setCaption("Enabled");
enabledToggle
@@ -125,7 +121,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component toggleInvalid() {
CheckBox invalid = new CheckBox("Invalid");
- invalid.setImmediate(true);
invalid.addValueChangeListener(event -> setInvalid(event.getValue()));
return invalid;
@@ -177,7 +172,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
private Component toggleError() {
CheckBox errorToggle = new CheckBox();
- errorToggle.setImmediate(true);
errorToggle.setCaption("Error");
errorToggle.addValueChangeListener(event -> setError(event.getValue()));
return errorToggle;
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
index 77e49f4a87..2ebd4ac495 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java
@@ -42,7 +42,6 @@ public class CssLayoutCustomCss extends TestBase implements ClickListener {
private Component createMarginsToggle() {
final CheckBox cb = new CheckBox("Margins");
- cb.setImmediate(true);
cb.addValueChangeListener(
event -> ((MarginHandler) layout).setMargin(cb.getValue()));
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java b/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
index b17a2a771b..f06db44b5c 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
@@ -28,7 +28,6 @@ public class FormLayoutWithInvisibleComponent extends TestBase {
messages.setRequired(true);
messages.setCaption("Messages visible");
});
- control.setImmediate(true);
formLayout.addComponent(control);
messages = new TextArea("Messages hidden");
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 64d0ba5e6c..8164d72f7f 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
@@ -149,8 +149,8 @@ public class CSSInjectWithColorpicker extends UI {
Styles styles = Page.getCurrent().getStyles();
// inject the new color as a style
- styles.add(".v-app .v-textarea.text-label { color:"
- + color.getCSS() + "; }");
+ styles.add(".v-app .v-textarea.text-label { color:" + color.getCSS()
+ + "; }");
});
return textColor;
@@ -160,14 +160,13 @@ public class CSSInjectWithColorpicker extends UI {
* Creates a font family selection dialog
*/
private Component createFontSelect() {
- final ComboBox<String> select = new ComboBox<>(null, Arrays.asList(
- "Arial", "Helvetica", "Verdana", "Courier", "Times",
- "sans-serif"));
+ final ComboBox<String> select = new ComboBox<>(null,
+ Arrays.asList("Arial", "Helvetica", "Verdana", "Courier",
+ "Times", "sans-serif"));
select.setValue("Arial");
select.setWidth("200px");
select.setPlaceholder("Font");
select.setDescription("Font");
- select.setImmediate(true);
select.setEmptySelectionAllowed(false);
select.addValueChangeListener(event -> {
// Get the new font family
@@ -196,7 +195,6 @@ public class CSSInjectWithColorpicker extends UI {
select.setValue(12);
select.setPlaceholder("Font size");
select.setDescription("Font size");
- select.setImmediate(true);
select.setEmptySelectionAllowed(false);
select.addValueChangeListener(event -> {
// Get the new font size
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 22ff9a8f5f..b135faa6e1 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
@@ -27,7 +27,6 @@ public class ReducingRoundTrips extends AbstractReindeerTestUI {
@Override
protected void setup(VaadinRequest request) {
PasswordField passwordField = new PasswordField("Enter password");
- passwordField.setImmediate(true);
CapsLockWarningWithRpc capsLockWarningWithRpc = new CapsLockWarningWithRpc();
capsLockWarningWithRpc.extend(passwordField);
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 8c2d0bb561..bd022cae76 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java
@@ -42,7 +42,6 @@ public class TogglePush extends AbstractReindeerTestUI {
CheckBox pushSetting = new CheckBox("Push enabled");
pushSetting.setValue(Boolean
.valueOf(getPushConfiguration().getPushMode().isEnabled()));
- pushSetting.setImmediate(true);
pushSetting.addValueChangeListener(event -> {
if (event.getValue()) {
getPushConfiguration().setPushMode(PushMode.AUTOMATIC);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java b/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java
index 862636fa3b..81c5a07261 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java
@@ -38,7 +38,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication {
}
});
themeToggle.setStyleName("small");
- themeToggle.setImmediate(true);
styleToggle = new CheckBox("Black style");
styleToggle.addValueChangeListener(event -> {
@@ -48,7 +47,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication {
main.getContent().setStyleName("");
}
});
- styleToggle.setImmediate(true);
styleToggle.setStyleName("small");
iconToggle = new CheckBox("64x icons");
@@ -56,7 +54,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication {
largeIcons = !largeIcons;
recreateAll();
});
- iconToggle.setImmediate(true);
iconToggle.setStyleName("small");
nativeToggle = new CheckBox("Native buttons");
@@ -64,7 +61,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication {
nativeButtons = !nativeButtons;
recreateAll();
});
- nativeToggle.setImmediate(true);
nativeToggle.setStyleName("small");
toggles.setSpacing(true);
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 d8d7d73d7c..19012a6019 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
@@ -397,7 +397,6 @@ public class CalendarTest extends GridLayout implements View {
private void initHideWeekEndButton() {
hideWeekendsButton = new CheckBox("Hide weekends");
- hideWeekendsButton.setImmediate(true);
hideWeekendsButton.addValueChangeListener(
event -> setWeekendsHidden(hideWeekendsButton.getValue()));
}
@@ -417,14 +416,12 @@ public class CalendarTest extends GridLayout implements View {
private void initReadOnlyButton() {
readOnlyButton = new CheckBox("Read-only mode");
- readOnlyButton.setImmediate(true);
readOnlyButton.addValueChangeListener(event -> calendarComponent
.setReadOnly(readOnlyButton.getValue()));
}
private void initDisabledButton() {
disabledButton = new CheckBox("Disabled");
- disabledButton.setImmediate(true);
disabledButton.addValueChangeListener(event -> calendarComponent
.setEnabled(!disabledButton.getValue()));
}
@@ -503,7 +500,6 @@ public class CalendarTest extends GridLayout implements View {
private CheckBox createCheckBox(String caption) {
CheckBox cb = new CheckBox(caption);
- cb.setImmediate(true);
return cb;
}
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 9c8d9f39b4..642ebfd28e 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
@@ -46,23 +46,18 @@ public class Tabsheets extends VerticalLayout implements View {
addComponent(wrap);
final CheckBox closable = new CheckBox("Closable");
- closable.setImmediate(true);
wrap.addComponent(closable);
final CheckBox overflow = new CheckBox("Overflow");
- overflow.setImmediate(true);
wrap.addComponent(overflow);
final CheckBox caption = new CheckBox("Captions", true);
- caption.setImmediate(true);
wrap.addComponent(caption);
final CheckBox icon = new CheckBox("Icons");
- icon.setImmediate(true);
wrap.addComponent(icon);
final CheckBox disable = new CheckBox("Disable tabs");
- disable.setImmediate(true);
wrap.addComponent(disable);
Label h3 = new Label("Additional Styles");
@@ -76,35 +71,27 @@ public class Tabsheets extends VerticalLayout implements View {
addComponent(wrap);
final CheckBox framed = new CheckBox("Framed", true);
- framed.setImmediate(true);
wrap.addComponent(framed);
final CheckBox centered = new CheckBox("Centered tabs");
- centered.setImmediate(true);
wrap.addComponent(centered);
final CheckBox rightAlign = new CheckBox("Right-aligned tabs");
- rightAlign.setImmediate(true);
wrap.addComponent(rightAlign);
final CheckBox equal = new CheckBox("Equal-width tabs");
- equal.setImmediate(true);
wrap.addComponent(equal);
final CheckBox padded = new CheckBox("Padded tabbar");
- padded.setImmediate(true);
wrap.addComponent(padded);
final CheckBox compact = new CheckBox("Compact");
- compact.setImmediate(true);
wrap.addComponent(compact);
final CheckBox iconsOnTop = new CheckBox("Icons on top");
- iconsOnTop.setImmediate(true);
wrap.addComponent(iconsOnTop);
final CheckBox selectedOnly = new CheckBox("Selected tab closable");
- selectedOnly.setImmediate(true);
wrap.addComponent(selectedOnly);
HasValue.ValueChangeListener<Boolean> update = event -> {
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java b/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java
index 0fa98d3d86..ec3a9e1b7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java
@@ -27,7 +27,6 @@ public class ValidationOfRequiredEmptyFields extends AbstractReindeerTestUI {
@Override
protected void setup(VaadinRequest request) {
requiredInput = new CheckBox("Field required");
- requiredInput.setImmediate(true);
requiredInput.addValueChangeListener(
event -> tf.setRequired(requiredInput.getValue()));
@@ -41,7 +40,6 @@ public class ValidationOfRequiredEmptyFields extends AbstractReindeerTestUI {
});
integerValidatorInput = new CheckBox("Integer validator");
- integerValidatorInput.setImmediate(true);
integerValidatorInput.addValueChangeListener(event -> {
if (integerValidatorInput.getValue()) {
tf.addValidator(integerValidator);
@@ -50,7 +48,6 @@ public class ValidationOfRequiredEmptyFields extends AbstractReindeerTestUI {
}
});
stringLengthValidatorInput = new CheckBox("String length validator");
- stringLengthValidatorInput.setImmediate(true);
stringLengthValidatorInput.addValueChangeListener(event -> {
if (stringLengthValidatorInput.getValue()) {
tf.addValidator(stringLengthValidator);
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
index e4dce67da8..a651da1a44 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java
@@ -30,7 +30,6 @@ import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HasWidgets;
import com.vaadin.client.data.DataChangeHandler;
import com.vaadin.client.data.DataSource;
-import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.shared.Registration;
import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.widgetset.server.v7.grid.GridClientColumnRenderers;
@@ -41,6 +40,7 @@ import com.vaadin.v7.client.renderers.NumberRenderer;
import com.vaadin.v7.client.renderers.Renderer;
import com.vaadin.v7.client.renderers.TextRenderer;
import com.vaadin.v7.client.renderers.WidgetRenderer;
+import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector;
import com.vaadin.v7.client.widget.grid.CellReference;
import com.vaadin.v7.client.widget.grid.RendererCellReference;
import com.vaadin.v7.client.widget.grid.datasources.ListDataSource;
@@ -53,7 +53,7 @@ import com.vaadin.v7.client.widgets.Grid;
@Connect(GridClientColumnRenderers.GridController.class)
public class GridClientColumnRendererConnector
- extends AbstractComponentConnector {
+ extends AbstractLegacyComponentConnector {
public static enum Renderers {
TEXT_RENDERER, WIDGET_RENDERER, HTML_RENDERER, NUMBER_RENDERER, DATE_RENDERER, CPLX_RENDERER;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
index ef9ef3adc9..60019fc201 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java
@@ -43,7 +43,6 @@ public class GridCheckBoxDisplay extends AbstractReindeerTestUI {
grid.setSelectionMode(Grid.SelectionMode.SINGLE);
grid.setEditorEnabled(true);
- grid.setImmediate(true);
getLayout().addComponent(grid);
getLayout().setExpandRatio(grid, 1);
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java
index 03f96ed20b..7a88da395b 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java
@@ -70,7 +70,6 @@ public class GridDetailsLocation extends UI {
layout.addComponent(checkbox);
numberTextField = new TextField("Row");
- numberTextField.setImmediate(true);
layout.addComponent(numberTextField);
layout.addComponent(
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java
index 155c3aafeb..3932773f4b 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java
@@ -126,7 +126,6 @@ public class GridFastAsyncUpdate extends AbstractTestUI {
grid = new Grid(container);
grid.setWidth("100%");
- grid.setImmediate(true);
grid.setSelectionMode(SelectionMode.SINGLE);
grid.addSelectionListener(new SelectionListener() {
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java
deleted file mode 100644
index 99562f7dcb..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.application;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.tests.tb3.SingleBrowserTest;
-
-public class ResynchronizeAfterAsyncRemovalTest extends SingleBrowserTest {
- @Test
- public void noResyncAfterAsyncRemoval() {
- openTestURL();
-
- $(ButtonElement.class).first().click();
-
- Assert.assertEquals("Timing issue in the test?",
- "1. Window removed: true", getLogRow(1));
-
- Assert.assertEquals(
- "Removing window should not cause button to be marked as dirty",
- "2. Dirty: false", getLogRow(0));
-
- ButtonElement logCountButton = $(ButtonElement.class).all().get(1);
- logCountButton.click();
-
- Assert.assertEquals("Sanity check", "3. syncId: 2", getLogRow(1));
- Assert.assertEquals("Sanity check",
- "4. Unregistered connector count: 1", getLogRow(0));
-
- logCountButton.click();
-
- Assert.assertEquals("Sanity check", "5. syncId: 3", getLogRow(1));
- Assert.assertEquals(
- "Unregistered connector map should have been cleared",
- "6. Unregistered connector count: 0", getLogRow(0));
- }
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java b/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java
deleted file mode 100644
index 2e8d462f5b..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import com.vaadin.testbench.elements.ButtonElement;
-import com.vaadin.tests.tb3.MultiBrowserTest;
-
-public class OutOfSyncTest extends MultiBrowserTest {
-
- @Test
- public void testClientResync() throws InterruptedException {
- openTestURL();
-
- // Wait for server to get rid of the Button
- sleep(1000);
-
- // On the first round-trip after the component has been removed, the
- // server assumes the client will remove the button. How ever (to force
- // it to be out of sync) the test UI calls markClean() on the Button to
- // make it not update with the response.
- $(ButtonElement.class).first().click();
- Assert.assertTrue(
- "Button should not have disappeared on the first click.",
- $(ButtonElement.class).exists());
-
- // Truly out of sync, full resync is forced.
- $(ButtonElement.class).first().click();
- Assert.assertFalse("Button should disappear with the second click.",
- $(ButtonElement.class).exists());
- }
-
-}
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
deleted file mode 100644
index 1d54339f8f..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.checkbox;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-
-import com.vaadin.testbench.elements.CheckBoxElement;
-import com.vaadin.testbench.elements.LabelElement;
-import com.vaadin.tests.tb3.MultiBrowserTest;
-
-public class CheckBoxImmediateTest extends MultiBrowserTest {
-
- @Test
- public void testNonImmediateCheckBox() {
- openTestURL();
-
- CheckBoxElement checkBoxElement = $(CheckBoxElement.class).first();
- WebElement inputElem = checkBoxElement.findElement(By.tagName("input"));
- final WebElement countElem = $(LabelElement.class).id("count");
-
- inputElem.click();
- assertEquals("Events received: 0", countElem.getText());
- }
-
- @Test
- public void testImmediateCheckBox() {
- openTestURL();
-
- CheckBoxElement checkBoxElement = $(CheckBoxElement.class).get(1);
- WebElement inputElem = checkBoxElement.findElement(By.tagName("input"));
- final WebElement countElem = $(LabelElement.class).id("count");
-
- inputElem.click();
- assertEquals("Events received: 1", countElem.getText());
- }
-}