summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2016-12-22 11:34:08 +0200
committerHenri Sara <henri.sara@gmail.com>2017-01-03 09:47:18 +0200
commita8835eaf31fd3a908647a71a26283f76383417bd (patch)
tree402301d7d2870c790caa09bfbfa18d4e279fcbee /client/src
parentadbe38eea2174322e637c56399493b62a1fdd444 (diff)
downloadvaadin-framework-a8835eaf31fd3a908647a71a26283f76383417bd.tar.gz
vaadin-framework-a8835eaf31fd3a908647a71a26283f76383417bd.zip
Update @since tags for 7.7.5
Change-Id: I73201908b537ca0a65106e03c9bad913b59fae9f Re-added back disappeared commit from 7.7.5 migration PR: Mark TextField/TextArea as busy when a text change event is pending (#20469) Change-Id: I404985ae0be1e7dc65171b610032f8649e700f50
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java2
-rw-r--r--client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/textfield/ValueChangeHandler.java13
-rw-r--r--client/src/main/java/com/vaadin/client/widgets/Grid.java3
4 files changed, 24 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java b/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java
index c5a9475d39..000966bde7 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java
@@ -87,6 +87,7 @@ public class DragHandle {
* later) both to provide the "-dragged" style and to make sure
* that the drag handle can be properly styled (it's otherwise
* invisible)
+ * @since 7.7.5
*/
public DragHandle(String baseName) {
this(baseName, null);
@@ -185,6 +186,7 @@ public class DragHandle {
*
* @param dragHandleCallback
* the callback object to use (can be null)
+ * @since 7.7.5
*/
public void setCallback(DragHandleCallback dragHandleCallback) {
userCallback = dragHandleCallback;
diff --git a/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java
index 251a5c7a97..50aa186bb1 100644
--- a/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/textfield/AbstractTextFieldConnector.java
@@ -16,6 +16,7 @@
package com.vaadin.client.ui.textfield;
import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.client.DeferredWorker;
import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.ui.AbstractFieldConnector;
import com.vaadin.client.ui.AbstractTextFieldWidget;
@@ -29,7 +30,7 @@ import com.vaadin.ui.AbstractTextField;
* Connector class for AbstractTextField.
*/
public abstract class AbstractTextFieldConnector extends AbstractFieldConnector
- implements ValueChangeHandler.Owner {
+ implements ValueChangeHandler.Owner, DeferredWorker {
private class AbstractTextFieldClientRpcImpl
implements AbstractTextFieldClientRpc {
@@ -134,4 +135,9 @@ public abstract class AbstractTextFieldConnector extends AbstractFieldConnector
sendValueChange();
}
+ @Override
+ public boolean isWorkPending() {
+ return getValueChangeHandler().isScheduled();
+ }
+
}
diff --git a/client/src/main/java/com/vaadin/client/ui/textfield/ValueChangeHandler.java b/client/src/main/java/com/vaadin/client/ui/textfield/ValueChangeHandler.java
index 89cca2394f..65d820c19a 100644
--- a/client/src/main/java/com/vaadin/client/ui/textfield/ValueChangeHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/textfield/ValueChangeHandler.java
@@ -38,10 +38,15 @@ public class ValueChangeHandler {
private Owner owner;
+ private boolean scheduled;
+
private Timer valueChangeTrigger = new Timer() {
@Override
public void run() {
- Scheduler.get().scheduleDeferred(() -> owner.sendValueChange());
+ Scheduler.get().scheduleDeferred(() -> {
+ owner.sendValueChange();
+ scheduled = false;
+ });
}
};
@@ -88,6 +93,7 @@ public class ValueChangeHandler {
}
private void lazyTextChange() {
+ scheduled = true;
valueChangeTrigger.schedule(valueChangeTimeout);
}
@@ -95,10 +101,12 @@ public class ValueChangeHandler {
if (valueChangeTrigger.isRunning()) {
return;
}
+ scheduled = true;
valueChangeTrigger.schedule(valueChangeTimeout);
}
private void eagerTextChange() {
+ scheduled = true;
valueChangeTrigger.run();
}
@@ -126,4 +134,7 @@ public class ValueChangeHandler {
this.valueChangeTimeout = valueChangeTimeout;
}
+ public boolean isScheduled() {
+ return scheduled;
+ }
}
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index 1ffda08ef7..2cac853ea1 100644
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -6107,6 +6107,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
*
* @param mode
* a ColumnResizeMode value
+ *
+ * @since 7.7.5
*/
public void setColumnResizeMode(ColumnResizeMode mode) {
columnResizeMode = mode;
@@ -6117,6 +6119,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
* {@link ColumnResizeMode.ANIMATED}.
*
* @return a ColumnResizeMode value
+ * @since 7.7.5
*/
public ColumnResizeMode getColumnResizeMode() {
return columnResizeMode;