Exemplo n.º 1
0
 /*
  * (non-Javadoc)
  *
  * @see org.lobobrowser.ua.NavigatorWindowListener#documentAccessed(org.
  * lobobrowser .ua.NavigatorWindowEvent)
  */
 @Override
 public void documentAccessed(NavigatorWindowEvent event) {
   URL url = event.getUrl();
   if ("GET".equals(event.getMethod()) && isHistoryRequest(event.getRequestType())) {
     NavigationHistory.getInstance().addAsRecent(url, null);
   }
 }
Exemplo n.º 2
0
 /*
  * (non-Javadoc)
  *
  * @see org.lobobrowser.ua.NavigatorWindowListener#defaultStatusUpdated(org.
  * lobobrowser .ua.NavigatorWindowEvent)
  */
 @Override
 public void defaultStatusUpdated(NavigatorWindowEvent event) {
   String defaultStatus = event.getMessage();
   this.defaultStatusMessage = event.getMessage();
   if (this.statusMessage == null) {
     this.statusMessageComponent.setText(defaultStatus);
   }
 }
Exemplo n.º 3
0
 /*
  * (non-Javadoc)
  *
  * @see org.lobobrowser.ua.NavigatorWindowListener#documentRendering(org.
  * lobobrowser .ua.NavigatorWindowEvent)
  */
 @Override
 public void documentRendering(NavigatorWindowEvent event) {
   if (logger.isLoggable(Level.INFO)) {
     logger.info("documentRendering(): event=" + event);
   }
   if (this.window.getTopFrame() == event.getNavigatorFrame()) {
     URL url = event.getUrl();
     this.addressField.setUrl(url);
     this.clearState();
     this.actionPool.updateEnabling();
   }
 }
 /**
  * Handle document rendering impl.
  *
  * @param frame the frame
  * @param response the response
  * @param content the content
  */
 private void handleDocumentRenderingImpl(
     final NavigatorFrame frame, ClientletResponse response, ComponentContent content) {
   if (frame == this.framePanel) {
     String title = this.getWindowTitle(response, content);
     Object window = this.browserWindow;
     if (window instanceof Frame) {
       ((Frame) window).setTitle(title);
     }
   }
   final NavigatorWindowEvent event =
       new NavigatorWindowEvent(this, NavigatorEventType.DOCUMENT_RENDERING, frame, response);
   latestAccessedFrame = event.getNavigatorFrame();
   if (!EVENT.fireEvent(event)) {
     logger.warning("handleDocumentRendering(): Did not deliver event to any window: " + event);
   }
 }
Exemplo n.º 5
0
  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);
    }
  }
Exemplo n.º 6
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.lobobrowser.ua.NavigatorWindowListener#statusUpdated(org.lobobrowser.
  * ua.NavigatorWindowEvent)
  */
 @Override
 public void statusUpdated(NavigatorWindowEvent event) {
   String status = event.getMessage();
   this.statusMessage = status;
   this.statusMessageComponent.setText(status == null ? this.defaultStatusMessage : status);
 }