diff options
author | Giovanni Lovato <heruan@aldu.net> | 2017-02-28 08:43:08 +0100 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2017-02-28 09:43:08 +0200 |
commit | 78cac3560bbbeb5de47211f7d89daac72dca76ad (patch) | |
tree | 809ebc65491d453a1b2614ea33ec1320c6044d36 /server/src/main/java | |
parent | aea1a69139d7a6542748b3c425d75883842b02b2 (diff) | |
download | vaadin-framework-78cac3560bbbeb5de47211f7d89daac72dca76ad.tar.gz vaadin-framework-78cac3560bbbeb5de47211f7d89daac72dca76ad.zip |
Allow powerful Navigator subclassing (#8663)
* Allow powerful Navigator subclassing
`protected` methods in `Navigator` permit to create new `Navigator`s to add new capabilities to Vaadin, but `Navigator` fields are still `private` and this limit, for example, the overriding of `Navigator.init`. This PR makes `private` the `Navigator` fields.
* Add documentation blocks to protected fields
Diffstat (limited to 'server/src/main/java')
-rw-r--r-- | server/src/main/java/com/vaadin/navigator/Navigator.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/server/src/main/java/com/vaadin/navigator/Navigator.java b/server/src/main/java/com/vaadin/navigator/Navigator.java index f6029e7d07..58f74e79f7 100644 --- a/server/src/main/java/com/vaadin/navigator/Navigator.java +++ b/server/src/main/java/com/vaadin/navigator/Navigator.java @@ -364,9 +364,22 @@ public class Navigator implements Serializable { } } - private UI ui; - private NavigationStateManager stateManager; - private ViewDisplay display; + /** + * The {@link UI} bound with the Navigator. + */ + protected UI ui; + + /** + * The {@link NavigationStateManager} that is used to get, listen to + * and manipulate the navigation state used by the Navigator. + */ + protected NavigationStateManager stateManager; + + /** + * The {@link ViewDisplay} used by the Navigator. + */ + protected ViewDisplay display; + private View currentView = null; private List<ViewChangeListener> listeners = new LinkedList<>(); private List<ViewProvider> providers = new LinkedList<>(); @@ -997,7 +1010,7 @@ public class Navigator implements Serializable { * state string * @return suitable provider */ - private ViewProvider getViewProvider(String state) { + protected ViewProvider getViewProvider(String state) { String longestViewName = null; ViewProvider longestViewNameProvider = null; for (ViewProvider provider : providers) { |