public void setDefaultStatus(final NavigatorFrame frame, final String defaultStatus) { synchronized (this) { this.defaultStatus = defaultStatus; if (this.status == null) { final String actualStatus = this.defaultStatus; final NavigatorWindowEvent event = new NavigatorWindowEvent( this, NavigatorEventType.STATUS_UPDATED, frame, actualStatus, RequestType.NONE); EventQueue.invokeLater(() -> EVENT.fireEvent(event)); } } }
public void setStatus(final NavigatorFrame frame, final String value) { String actualStatus; synchronized (this) { if (!java.util.Objects.equals(this.status, value)) { this.status = value; actualStatus = value == null ? this.defaultStatus : value; final NavigatorWindowEvent event = new NavigatorWindowEvent( this, NavigatorEventType.STATUS_UPDATED, frame, actualStatus, RequestType.NONE); EventQueue.invokeLater(() -> EVENT.fireEvent(event)); } } }
private void handleDocumentRenderingImpl( final NavigatorFrame frame, final ClientletResponse response, final ComponentContent content) { if (frame == this.framePanel) { final String title = BrowserPanel.getWindowTitle(response, content); this.setDocumentTitle(title); } final NavigatorWindowEvent event = new NavigatorWindowEvent( this, NavigatorEventType.DOCUMENT_RENDERING, frame, response, response.getRequestType()); this.latestAccessedFrame = event.getNavigatorFrame(); if (!EVENT.fireEvent(event)) { logger.warning("handleDocumentRendering(): Did not deliver event to any window: " + event); } }
/* * (non-Javadoc) * * @see * org.lobobrowser.ua.NavigatorWindow#removeNavigatorWindowListener(org. * lobobrowser .ua.NavigatorWindowListener) */ @Override public void removeNavigatorWindowListener(NavigatorWindowListener listener) { EVENT.removeListener(listener); }
/* * (non-Javadoc) * * @see org.lobobrowser.ua.NavigatorWindow#addNavigatorWindowListener(org. * lobobrowser .ua.NavigatorWindowListener) */ @Override public void addNavigatorWindowListener(final NavigatorWindowListener listener) { EVENT.addListener(listener); }
public void updateProgress(final NavigatorProgressEvent event) { EventQueue.invokeLater(() -> EVENT.fireEvent(event)); }
public void handleDocumentAccess(final NavigatorFrame frame, final ClientletResponse response) { final NavigatorWindowEvent event = new NavigatorWindowEvent( this, NavigatorEventType.DOCUMENT_ACCESSED, frame, response, response.getRequestType()); SwingUtilities.invokeLater(() -> EVENT.fireEvent(event)); }
public void removeNavigatorWindowListener(final NavigatorWindowListener listener) { EVENT.removeListener(listener); }