From: Johannes Dahlström Date: Fri, 31 Aug 2012 13:22:13 +0000 (+0300) Subject: addListener rename in Navigator (#9285) X-Git-Tag: 7.0.0.beta1~206^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=54190550f969edc47901ba9a32239707231703f1;p=vaadin-framework.git addListener rename in Navigator (#9285) --- 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");