From 54190550f969edc47901ba9a32239707231703f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Dahlstr=C3=B6m?= Date: Fri, 31 Aug 2012 16:22:13 +0300 Subject: [PATCH] addListener rename in Navigator (#9285) --- .../src/com/vaadin/navigator/Navigator.java | 21 +------------------ .../tests/server/navigator/NavigatorTest.java | 6 +++--- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/server/src/com/vaadin/navigator/Navigator.java b/server/src/com/vaadin/navigator/Navigator.java index e2e40ea732..2f42acb320 100644 --- a/server/src/com/vaadin/navigator/Navigator.java +++ b/server/src/com/vaadin/navigator/Navigator.java @@ -103,7 +103,7 @@ public class Navigator implements Serializable { this.page = page; this.navigator = navigator; - page.addListener(this); + page.addFragmentChangedListener(this); } @Override @@ -666,15 +666,6 @@ public class Navigator implements Serializable { listeners.add(listener); } - /** - * @deprecated Since 7.0, replaced by - * {@link #addViewChangeListener(ViewChangeListener)} - **/ - @Deprecated - public void addListener(ViewChangeListener listener) { - addViewChangeListener(listener); - } - /** * Remove a view change listener. * @@ -684,14 +675,4 @@ public class Navigator implements Serializable { public void removeViewChangeListener(ViewChangeListener listener) { listeners.remove(listener); } - - /** - * @deprecated Since 7.0, replaced by - * {@link #removeViewChangeListener(ViewChangeListener)} - **/ - @Deprecated - public void removeListener(ViewChangeListener listener) { - removeViewChangeListener(listener); - } - } diff --git a/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java b/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java index fa48e4bff6..bcc4c83b1e 100644 --- a/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java +++ b/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java @@ -312,7 +312,7 @@ public class NavigatorTest extends TestCase { // test navigator navigator.addProvider(provider); - navigator.addListener(listener); + navigator.addViewChangeListener(listener); navigator.navigateTo("test1"); navigator.navigateTo("test2"); @@ -385,8 +385,8 @@ public class NavigatorTest extends TestCase { // test navigator navigator.addProvider(provider); - navigator.addListener(listener1); - navigator.addListener(listener2); + navigator.addViewChangeListener(listener1); + navigator.addViewChangeListener(listener2); navigator.navigateTo("test1"); navigator.navigateTo("test1/test"); -- 2.39.5