private void updateNavigateButtons(JWebBrowser webBrowser) { navigateBar.updateLocation(webBrowser.getResourceLocation()); navigateBar.getStopButton().setEnabled(false); INativeWebBrowser nativeWebBrowser = (INativeWebBrowser) webBrowser.getNativeComponent(); if (!nativeWebBrowser.isNativePeerDisposed()) { boolean isBackEnabled = nativeWebBrowser.isNativePeerInitialized() ? nativeWebBrowser.isBackNavigationEnabled() : false; navigateBar.getBackButton().setEnabled(isBackEnabled); boolean isForwardEnabled = nativeWebBrowser.isNativePeerInitialized() ? nativeWebBrowser.isForwardNavigationEnabled() : false; navigateBar.getForwardButton().setEnabled(isForwardEnabled); } }
public void setNavigateBarVisible(boolean isNavigateBarVisible) { navigateBar.setVisible(isNavigateBarVisible); }
public void updateStopButton(JWebBrowser webBrowser) { if (webBrowser.getLoadingProgress() < 100) navigateBar.getStopButton().setEnabled(true); else navigateBar.getStopButton().setEnabled(false); }
private void updateLocation(JWebBrowser webBrowser) { if (!navigateBar.getLocationField().isFocusOwner()) navigateBar.updateLocation(webBrowser.getResourceLocation()); }