Package org.mozilla.interfaces

Examples of org.mozilla.interfaces.nsIWebBrowser


    this.browser = browser;
    this.element = (nsIDOMElement)event.getTarget ().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
  }

  String getSelectedText() {
    nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser ();
    nsIDOMWindow dw = webBrowser.getContentDOMWindow();
    nsISelection selection = dw.getSelection();

    StringBuilder builder = new StringBuilder();
    for(int i = 0;  i<  selection.getRangeCount(); i++) {
      nsIDOMRange idomRange = selection.getRangeAt(i);
View Full Code Here


    }
    return builder.toString();
  }

  String getSelectedHTML() {
    nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser ();
    nsIDOMWindow dw = webBrowser.getContentDOMWindow();
    nsISelection selection = dw.getSelection();

    StringBuilder builder = new StringBuilder();
    for(int i = 0;  i<  selection.getRangeCount(); i++) {
      nsIDOMRange idomRange = selection.getRangeAt(i);
View Full Code Here

    }
    return builder.toString();
  }

  public String[] getSelectedLink() {
    nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser ();
    nsIDOMWindow dw = webBrowser.getContentDOMWindow();
    nsISelection selection = dw.getSelection();

    List<String> list  = new ArrayList<String>();
   
    for(int i = 0;  i<  selection.getRangeCount(); i++) {
View Full Code Here

    browser = ApplicationFactory.createBrowser(browserComposite, PageMenu.class);
    if(ApplicationFactory.isMozillaBrowser()) {
      browser.addProgressListener (new ProgressAdapter () {
        @SuppressWarnings("unused")
        public void completed (ProgressEvent event) {
          nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser ();
          if(webBrowser == null) return;
          nsIDOMWindow domWindow = webBrowser.getContentDOMWindow ();
          if(domWindow == null) return;
          nsIDOMEventTarget target = (nsIDOMEventTarget)domWindow.queryInterface (nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
          nsIDOMEventListener listener = new nsIDOMEventListener () {
            public nsISupports queryInterface (String uuid) {
              if (uuid.equals (nsIDOMEventListener.NS_IDOMEVENTLISTENER_IID) ||
View Full Code Here

        final Browser browser = new Browser(parent, SWT.MOZILLA | SWT.BORDER);
        if(clazz == null) return browser;
        browser.addProgressListener (new ProgressAdapter () {
          @SuppressWarnings("unused")
          public void completed (ProgressEvent event) {
            nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser ();
            nsIDOMWindow domWindow = webBrowser.getContentDOMWindow ();
            nsIDOMEventTarget target = (nsIDOMEventTarget)domWindow.queryInterface (nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
            nsIDOMEventListener listener = new nsIDOMEventListener () {
              public nsISupports queryInterface (String uuid) {
                if (uuid.equals (nsIDOMEventListener.NS_IDOMEVENTLISTENER_IID) ||
                    uuid.equals (nsIDOMEventListener.NS_ISUPPORTS_IID)) {
View Full Code Here

      this.runOnSWTThread(new Runnable() {
         @Override
         public void run() {
            Browser browser = Crawler.this.getBrowser();
            nsIWebBrowser web_browser = (nsIWebBrowser) browser.getWebBrowser();
            nsIDOMWindow window = web_browser.getContentDOMWindow();
            nsIDOMDocument document = window.getDocument();
            outs[0] = document;
            }
         });
View Full Code Here

    * @return   the DOM document.
    */
   @SuppressWarnings("hiding")
   protected nsIDOMDocument getDocument() {
      Browser browser = this.getBrowser();
      nsIWebBrowser web_browser = (nsIWebBrowser) browser.getWebBrowser();
      nsIDOMWindow window = web_browser.getContentDOMWindow();
      nsIDOMDocument document = window.getDocument();
      return document;
      }
View Full Code Here

      this.runOnSWTThread(new Runnable() {
         @Override
         public void run() {
            Browser browser = Crawler.this.getBrowser();
            nsIWebBrowser web_browser = (nsIWebBrowser) browser.getWebBrowser();
            nsIDOMWindow window = web_browser.getContentDOMWindow();
            nsIDOMDocument document = window.getDocument();
            outs[0] = document;
            }
         });
View Full Code Here

      this.runOnSWTThread(new Runnable() {
         @Override
         public void run() {
            Browser browser = Crawler.this.getBrowser();
            nsIWebBrowser web_browser = (nsIWebBrowser) browser.getWebBrowser();
            nsIDOMWindow window = web_browser.getContentDOMWindow();
            nsIDOMDocument document = window.getDocument();
            outs[0] = document;
            }
         });
View Full Code Here

      this.runOnSWTThread(new Runnable() {
         @Override
         public void run() {
            Browser browser = Crawler.this.getBrowser();
            nsIWebBrowser web_browser = (nsIWebBrowser) browser.getWebBrowser();
            nsIDOMWindow window = web_browser.getContentDOMWindow();
            nsIDOMDocument document = window.getDocument();
            outs[0] = document;
            }
         });
View Full Code Here

TOP

Related Classes of org.mozilla.interfaces.nsIWebBrowser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.