Examples of LocationAdapter


Examples of org.eclipse.swt.browser.LocationAdapter

    public void createPartControl(Composite parent) {
        browser = new Browser(parent, SWT.NONE);
        createActions();

        // Prevent navigation away from JPM4J.org, and redirect from HTTP back to HTTPS
        browser.addLocationListener(new LocationAdapter() {
            @Override
            public void changing(LocationEvent event) {
                if (event.location.startsWith(HTTPS_URL))
                    return;
                if (event.location.startsWith(HTTP_URL))
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

            }

            createActions();

            // Prevent navigation away from JPM4J.org, and redirect from HTTP back to HTTPS
            browser.addLocationListener(new LocationAdapter() {
                @Override
                public void changing(LocationEvent event) {
                    if (event.location.startsWith(HTTPS_URL))
                        return;
                    if (event.location.startsWith(HTTP_URL))
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

                }
                status.setMessage(event.text);
                */
            }        
        });
        browser.addLocationListener(new LocationAdapter() {
            public void changed(LocationEvent event) {
                if (event.top){
                    //label.setToolTipText( browser.getUrl() );                   
                }
            }
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

        boolean success = false;
        if (browser != null) {
            long start = 0;
            if (Log.logPerformance)
                start = System.currentTimeMillis();
            browser.addLocationListener(new LocationAdapter() {
              public void changed(LocationEvent event) {
                if (event.top) {
                  isFinishedLoading = true;
                }
              }
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

   *            the handler to use to handle links
   * @return a new {@link LocationListener}
   */
  public static LocationListener createLocationListener(
      final ILinkHandler handler) {
    return new LocationAdapter() {
      public void changing(LocationEvent event) {
        String loc = event.location;

        if ("about:blank".equals(loc)) { //$NON-NLS-1$
          /*
 
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

    fBrowser = browser;
    registerListeners();
  }

  private void registerListeners() {
    LocationListener locationListener = new LocationAdapter() {
      @Override
      public void changed(LocationEvent event) {
        fNavigationToolBarManager.find(BACK_ACTION).update(IAction.ENABLED);
        fNavigationToolBarManager.find(FORWARD_ACTION).update(IAction.ENABLED);
        setBusy(false);
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

          fEditorSite.getActionBars().getStatusLineManager().setMessage(event.text);
      }
    });

    /* Location Listener */
    fBrowser.getControl().addLocationListener(new LocationAdapter() {
      @Override
      public void changed(LocationEvent event) {
        fNavigationToolBarManager.find(BACK_ACTION).update(IAction.ENABLED);
        fNavigationToolBarManager.find(FORWARD_ACTION).update(IAction.ENABLED);
        setBusy(false);
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

        }
      }
    });

    /* Control Browser's visibility based on the location */
    ((Browser) fViewer.getControl()).addLocationListener(new LocationAdapter() {
      @Override
      public void changing(LocationEvent event) {
        if (event.doit) {
          String loc = event.location;
          boolean visible = fViewer.getControl().getVisible();
View Full Code Here

Examples of org.eclipse.swt.browser.LocationAdapter

        };

        browserInitialized = false;
        browser.setUrl(refreshURL);

        browser.addLocationListener(new LocationAdapter()
        {
            @Override
            public void changing(LocationEvent event)
            {
                if (!event.location.startsWith("file:")) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.