diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2016-12-14 15:12:13 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2016-12-14 15:12:13 +0200 |
commit | ce26bf7c4ce2d3f4a40904d103cb85bdd8fb17c6 (patch) | |
tree | e804c7ec2f4a392cb50a9261354ae367c6fac7d0 /server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java | |
parent | b2e3aa2acf99e98dc3e5ac3c96ec829fe3896c47 (diff) | |
download | vaadin-framework-ce26bf7c4ce2d3f4a40904d103cb85bdd8fb17c6.tar.gz vaadin-framework-ce26bf7c4ce2d3f4a40904d103cb85bdd8fb17c6.zip |
Remove usage of Consumer from event listeners (#7985)
Touched event listeners are:
- SelectionListener
- MultiSelectionListener
- SingleSelectionListener
- ValueChangeListener
- ItemClickListener
- BindingValidationStatusHandler
- BinderValidationStatusHandler
- StatusChangeListener
Part of vaadin/framework8-issues#264
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java b/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java index 1ff77b7f1a..6c0d1efc54 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java +++ b/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java @@ -15,7 +15,6 @@ */ package com.vaadin.ui; -import java.lang.reflect.Method; import java.util.Collection; import java.util.HashSet; import java.util.List; @@ -37,7 +36,6 @@ import com.vaadin.shared.data.selection.SelectionServerRpc; import com.vaadin.shared.ui.AbstractSingleSelectState; import com.vaadin.ui.declarative.DesignContext; import com.vaadin.ui.declarative.DesignException; -import com.vaadin.util.ReflectTools; import elemental.json.Json; @@ -57,11 +55,6 @@ import elemental.json.Json; public abstract class AbstractSingleSelect<T> extends AbstractListing<T> implements SingleSelect<T> { - @Deprecated - private static final Method SELECTION_CHANGE_METHOD = ReflectTools - .findMethod(SingleSelectionListener.class, "accept", - SingleSelectionEvent.class); - /** * Creates a new {@code AbstractListing} with a default data communicator. * <p> @@ -106,7 +99,7 @@ public abstract class AbstractSingleSelect<T> extends AbstractListing<T> public Registration addSelectionListener( SingleSelectionListener<T> listener) { return addListener(SingleSelectionEvent.class, listener, - SELECTION_CHANGE_METHOD); + SingleSelectionListener.SELECTION_CHANGE_METHOD); } /** @@ -168,7 +161,7 @@ public abstract class AbstractSingleSelect<T> extends AbstractListing<T> @Override public Registration addValueChangeListener( HasValue.ValueChangeListener<T> listener) { - return addSelectionListener(event -> listener.accept( + return addSelectionListener(event -> listener.valueChange( new ValueChangeEvent<>(this, event.isUserOriginated()))); } |