/** * Returns the panel that this Navigation object manages. The contents of this panel will be updated by the navigation * system in response to PageTransition requests, as well as changes to the GWT navigation system. * * @return The content panel of this Navigation instance. It is not recommended that client code modifies the contents * of this panel, because this Navigation instance may replace its contents at any time. */ public IsWidget getContentPanel() { return navigatingContainer.asWidget(); }
@Override public void hideContent(Object page, NavigatingContainer defaultContainer, IsWidget widget, Object nextPage, DelegationControl control) { defaultContainer.clear(); control.proceed(); } }
@Override public void showContent(Object page, NavigatingContainer defaultContainer, IsWidget widget, Object previousPage, DelegationControl control) { defaultContainer.setWidget(widget); control.proceed(); }
/** * Hide the page currently displayed and call the associated lifecycle methods. * * @param requestPage the next requested page, this can be null if there is none. */ private void hideCurrentPage(Object requestPage, NavigationControl control) { final IsWidget currentContent = navigatingContainer.getWidget(); // Note: Optimized out in production mode if (currentPage != null && (currentContent == null || currentWidget.asWidget() != currentContent)) { // This could happen if someone was manipulating the DOM behind our backs GWT.log("Current content widget vanished or changed. " + "Not delivering pageHiding event to " + currentPage + "."); } DelegationControl hideControl = new DelegationControl(() -> { if (currentPage != null && currentComponent != null) { currentPage.pageHidden(currentComponent); currentPage.destroy(currentComponent); } control.proceed(); }); if (currentComponent != null) { contentDelegation.hideContent(currentComponent, navigatingContainer, currentWidget, requestPage, hideControl); } else { navigatingContainer.clear(); hideControl.proceed(); } }
if (currentPage != null && currentWidget != null && currentComponent != null && currentWidget.asWidget() == navigatingContainer.getWidget()) { currentPage.pageHiding(Factory.maybeUnwrapProxy(currentComponent), control); } else {
/** * Hide the page currently displayed and call the associated lifecycle methods. * * @param requestPage the next requested page, this can be null if there is none. */ private void hideCurrentPage(Object requestPage, NavigationControl control) { final IsWidget currentContent = navigatingContainer.getWidget(); // Note: Optimized out in production mode if (currentPage != null && (currentContent == null || currentWidget.asWidget() != currentContent)) { // This could happen if someone was manipulating the DOM behind our backs GWT.log("Current content widget vanished or changed. " + "Not delivering pageHiding event to " + currentPage + "."); } DelegationControl hideControl = new DelegationControl(() -> { if (currentPage != null && currentComponent != null) { currentPage.pageHidden(currentComponent); currentPage.destroy(currentComponent); } control.proceed(); }); if (currentComponent != null) { contentDelegation.hideContent(currentComponent, navigatingContainer, currentWidget, requestPage, hideControl); } else { navigatingContainer.clear(); hideControl.proceed(); } }
if (currentPage != null && currentWidget != null && currentComponent != null && currentWidget.asWidget() == navigatingContainer.getWidget()) { currentPage.pageHiding(Factory.maybeUnwrapProxy(currentComponent), control); } else {
@Override public void hideContent(Object page, NavigatingContainer defaultContainer, IsWidget widget, Object nextPage, DelegationControl control) { defaultContainer.clear(); control.proceed(); } }
/** * Returns the panel that this Navigation object manages. The contents of this panel will be updated by the navigation * system in response to PageTransition requests, as well as changes to the GWT navigation system. * * @return The content panel of this Navigation instance. It is not recommended that client code modifies the contents * of this panel, because this Navigation instance may replace its contents at any time. */ public IsWidget getContentPanel() { return navigatingContainer.asWidget(); }
@Override public void showContent(Object page, NavigatingContainer defaultContainer, IsWidget widget, Object previousPage, DelegationControl control) { defaultContainer.setWidget(widget); control.proceed(); }