소스 검색

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 년 전
부모
커밋
78cac3560b
1개의 변경된 파일17개의 추가작업 그리고 4개의 파일을 삭제
  1. 17
    4
      server/src/main/java/com/vaadin/navigator/Navigator.java

+ 17
- 4
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) {

Loading…
취소
저장