Browse Source

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
tags/8.1.0.alpha1
Giovanni Lovato 7 years ago
parent
commit
78cac3560b
1 changed files with 17 additions and 4 deletions
  1. 17
    4
      server/src/main/java/com/vaadin/navigator/Navigator.java

+ 17
- 4
server/src/main/java/com/vaadin/navigator/Navigator.java View File

@@ -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) {

Loading…
Cancel
Save