/**
   * TitleChange event handler.
   *
   * <p>args[0] String that specifies the new document title.
   *
   * @param args event arguments
   */
  public void TitleChange(Variant[] args) {
    String sText = args[0].toString();

    for (WindowListener l : m_windowListeners) {
      l.titleChange(sText);
    }
  }
  /**
   * ClientToHostWindow event handler
   *
   * <p>args[0] Long integer that receives the width of the client window and can be set by the host
   * application. args[1] Long integer that receives the height of the client window and can be set
   * by the host application.
   *
   * @param args event arguments
   */
  public void ClientToHostWindow(Variant[] args) {
    int width = args[0].changeType(Variant.VariantInt).getInt();
    int height = args[1].changeType(Variant.VariantInt).getInt();

    for (WindowListener l : m_windowListeners) {
      l.clientToHostWindow(width, height);
    }
  }
  /**
   * CommandStateChange event handler.
   *
   * <p>args[0] CommandStateChangeConstants enumeration value that specifies the command that
   * changed. args[1] Boolean value that specifies the enabled state.
   *
   * @param args event arguments
   */
  public void CommandStateChange(Variant[] args) {
    int command = args[0].changeType(Variant.VariantInt).getInt();
    boolean enabled = args[1].changeType(Variant.VariantBoolean).getBoolean();

    for (WindowListener l : m_windowListeners) {
      l.commandStateChange(command, enabled);
    }
  }
 /**
  * WindowClosing event handler.
  *
  * <p>args[0] Boolean that specifies whether the window was created from script. args[1] Boolean
  * value that specifies whether the window is prevented from closing.
  *
  * @param args event arguments
  */
 public void WindowClosing(Variant[] args) {
   boolean isChild = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     if (l.windowClosing(isChild) == true) {
       args[1].putBoolean(true);
     }
   }
 }
 public void hide() {
   WindowListener listener = windowListener;
   if (listener != null) {
     // We're not getting WINDOW_CLOSING from the native code when hiding
     // the window programmatically. So, create it and notify the listener.
     listener.windowClosing(new WindowEvent((Window) target, WindowEvent.WINDOW_CLOSING));
   }
   super.hide();
 }
 // WARNING: it's called on the Toolkit thread!
 void preprocessPostEvent(AWTEvent event) {
   if (event instanceof WindowEvent) {
     WindowListener listener = windowListener;
     if (listener != null) {
       switch (event.getID()) {
         case WindowEvent.WINDOW_CLOSING:
           listener.windowClosing((WindowEvent) event);
           break;
         case WindowEvent.WINDOW_ICONIFIED:
           listener.windowIconified((WindowEvent) event);
           break;
       }
     }
   }
 }
 /**
  * WindowSetWidth event handler.
  *
  * <p>args[0] Long that specifies the width of the WebBrowser control.
  *
  * @param args event arguments
  */
 public void WindowSetWidth(Variant[] args) {
   int width = args[0].changeType(Variant.VariantInt).getInt();
   for (WindowListener l : m_windowListeners) {
     l.windowSetWidth(width);
   }
 }
 /**
  * WindowSetTop event handler.
  *
  * <p>args[0] Long that specifies the top position of the WebBrowser control.
  *
  * @param args event arguments
  */
 public void WindowSetTop(Variant[] args) {
   int top = args[0].changeType(Variant.VariantInt).getInt();
   for (WindowListener l : m_windowListeners) {
     l.windowSetTop(top);
   }
 }
 /**
  * WindowSetResizable event handler.
  *
  * <p>args[0] Boolean that specifies whether the WebBrowser control is resizable.
  *
  * @param args event arguments
  */
 public void WindowSetResizable(Variant[] args) {
   boolean resizable = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     l.windowSetResizable(resizable);
   }
 }
 /**
  * WindowSetLeft event handler.
  *
  * <p>args[0] Long that specifies the new left position of the WebBrowser window
  *
  * @param args event arguments
  */
 public void WindowSetLeft(Variant[] args) {
   int left = args[0].changeType(Variant.VariantInt).getInt();
   for (WindowListener l : m_windowListeners) {
     l.windowSetLeft(left);
   }
 }
 /**
  * OnTheatreMode event handler
  *
  * <p>args[0] Boolean value that specifies whether the browser is in theatre mode.
  *
  * @param args event arguments
  */
 public void OnTheatreMode(Variant[] args) {
   boolean theatreMode = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     l.onTheatreMode(theatreMode);
   }
 }
 /**
  * Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and
  * listener-b.
  *
  * @param e the window event
  */
 public void windowDeiconified(WindowEvent e) {
   ((WindowListener) a).windowDeiconified(e);
   ((WindowListener) b).windowDeiconified(e);
 }
Example #13
0
 private void fireFocusChangedEvent() {
   for (WindowListener listener : mListeners) {
     listener.focusChanged();
   }
 }
 /**
  * SetSecureLockIcon event handler.
  *
  * <p>args[0] Integer that specifies one of the SecureLockIconConstants.
  *
  * @param args event arguments
  */
 public void SetSecureLockIcon(Variant[] args) {
   int flag = args[0].changeType(Variant.VariantInt).getInt();
   for (WindowListener l : m_windowListeners) {
     l.setSecureLockIcon(flag);
   }
 }
 /**
  * PropertyChange event handler.
  *
  * <p>args[0] String that specifies the name of the property whose value has changed.
  *
  * @param args event arguments
  */
 public void PropertyChange(Variant[] args) {
   String property = args[0].toString();
   for (WindowListener l : m_windowListeners) {
     l.propertyChange(property);
   }
 }
 /**
  * PrivacyImpactedStateChange event handler.
  *
  * <p>args[0] Boolean that indicates whether the current top-level URL has violated the browser's
  * privacy settings.
  *
  * @param args event arguments
  */
 public void PrivacyImpactedStateChange(Variant[] args) {
   boolean impacted = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     l.privacyImpactedStateChange(impacted);
   }
 }
 /**
  * PrintTemplateTeardown event handler.
  *
  * <p>args[0] Object that evaluates to the top-level or frame WebBrowser object corresponding to
  * the navigation.
  *
  * @param args event arguments
  */
 public void PrintTemplateTeardown(Variant[] args) {
   for (WindowListener l : m_windowListeners) {
     l.printTemplateTeardown();
   }
 }
 /**
  * PrintTemplateInstantiation event handler.
  *
  * <p>args[0] Object that evaluates to the top-level or frame WebBrowser object corresponding to
  * the navigation.
  *
  * @param args event arguments
  */
 public void PrintTemplateInstantiation(Variant[] args) {
   for (WindowListener l : m_windowListeners) {
     l.printTemplateInstantiation();
   }
 }
 /**
  * OnVisible event handler.
  *
  * <p>args[0] Boolean that specifies whether the object is visible.
  *
  * @param args event arguments
  */
 public void OnVisible(Variant[] args) {
   boolean visible = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     l.onVisible(visible);
   }
 }
 /**
  * OnFullScreen event handler
  *
  * <p>args[0] Boolean value that specifies whether the browser window is in full-screen mode.
  *
  * @param args event arguments
  */
 public void OnFullScreen(Variant[] args) {
   boolean fullScreen = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     l.onFullScreen(fullScreen);
   }
 }
Example #21
0
 private void fireWindowsChangedEvent() {
   for (WindowListener listener : mListeners) {
     listener.windowsChanged();
   }
 }
 /**
  * OnQuit event handler.
  *
  * @param args event arguments
  */
 public void OnQuit(Variant[] args) {
   for (WindowListener l : m_windowListeners) {
     l.onQuit();
   }
 }
 /**
  * Handles the windowClosed event by invoking the windowClosed methods on listener-a and
  * listener-b.
  *
  * @param e the window event
  */
 public void windowClosed(WindowEvent e) {
   ((WindowListener) a).windowClosed(e);
   ((WindowListener) b).windowClosed(e);
 }
 /**
  * WindowSetHeight event handler.
  *
  * <p>args[0] Long that specifies the new height of the WebBrowser control.
  *
  * @param args event arguments
  */
 public void WindowSetHeight(Variant[] args) {
   int height = args[0].changeType(Variant.VariantInt).getInt();
   for (WindowListener l : m_windowListeners) {
     l.windowSetHeight(height);
   }
 }
 /**
  * Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and
  * listener-b.
  *
  * @param e the window event
  */
 public void windowDeactivated(WindowEvent e) {
   ((WindowListener) a).windowDeactivated(e);
   ((WindowListener) b).windowDeactivated(e);
 }
 /**
  * OnStatusBar event handler.
  *
  * <p>args[0] Boolean value that specifies whether the status bar is shown.
  *
  * @param args event arguments
  */
 public void OnStatusBar(Variant[] args) {
   boolean statusBarVisible = args[0].changeType(Variant.VariantBoolean).getBoolean();
   for (WindowListener l : m_windowListeners) {
     l.onStatusBar(statusBarVisible);
   }
 }