Package org.eclipse.swt.browser

Examples of org.eclipse.swt.browser.Browser


          fNewsBrowserControl.setFocus();
        }
      };

      /* Run setFocus() delayed if input not yet set */
      Browser browser = fNewsBrowserControl.getViewer().getBrowser().getControl();
      if (!StringUtils.isSet(browser.getUrl()))
        JobRunner.runDelayedInUIThread(browser, runnable);
      else
        runnable.run();
    }
  }
View Full Code Here


    public BytecodeReferenceView() {
        super();
    }

    public void createPartControl(Composite parent) {
        browser = new Browser(parent, SWT.BORDER);
        final IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow();
        linkWithView = BytecodeOutlinePlugin.getDefault().getPreferenceStore()
            .getBoolean(BCOConstants.LINK_REF_VIEW_TO_EDITOR);
        linkWithViewAction = new DefaultToggleAction(BCOConstants.LINK_REF_VIEW_TO_EDITOR){
            public void run(boolean newState) {
View Full Code Here

    private Action forwardAction;
    private ISelectionService selectionService;

    @Override
    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
View Full Code Here

    Label urlLabel = new Label(container, SWT.NONE);
    urlLabel.setText("URL: "+in.getUrl());
    gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL,
        GridData.VERTICAL_ALIGN_FILL, true, false, 1, 2);
    urlLabel.setLayoutData(gd);
        browser = new Browser(container, SWT.NONE);
    browser.setUrl(in.getUrl());
    gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    browser.setLayoutData(gd);
  }
View Full Code Here

    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(canvas, 5, SWT.DEFAULT);
    data.bottom = new FormAttachment(status, -5, SWT.DEFAULT);
    try {
      browser = new Browser(parent, SWT.NONE);
      browser.setLayoutData(data);
    } catch (SWTError e) {
      /* Browser widget could not be instantiated */
      Label label = new Label(parent, SWT.CENTER | SWT.WRAP);
      label.setText(getResourceString("BrowserNotCreated"));
View Full Code Here

  static void initialize(final Display display, Browser browser) {
    browser.addOpenWindowListener(new OpenWindowListener() {
      public void open(WindowEvent event) {
        Shell shell = new Shell(display);
        shell.setLayout(new FillLayout());
        Browser browser = new Browser(shell, SWT.NONE);
        initialize(display, browser);
        event.browser = browser;
      }
    });
    browser.addVisibilityWindowListener(new VisibilityWindowListener() {
      public void hide(WindowEvent event) {
      }
      public void show(WindowEvent event) {
        Browser browser = (Browser) event.widget;
        Shell shell = browser.getShell();
        if (event.location != null)
          shell.setLocation(event.location);
        if (event.size != null) {
          Point size = event.size;
          shell.setSize(shell.computeSize(size.x, size.y));
        }
        shell.open();
      }
    });
    browser.addCloseWindowListener(new CloseWindowListener() {
      public void close(WindowEvent event) {
        Browser browser = (Browser) event.widget;
        Shell shell = browser.getShell();
        shell.close();
      }
    });
  }
View Full Code Here

  public TestabilityReportView() {
  }

  @Override
  public void createPartControl(Composite parent) {
    browser = new Browser(parent, SWT.NONE);
    browser.setUrl(url);
  }
View Full Code Here

        dialogShell.setLayout(dialogShellLayout);
        dialogShell.layout();
        dialogShell.pack();
        dialogShell.setSize(800, 600);

        browser = new Browser(dialogShell, SWT.NONE | SWT.BORDER);
        final GridData browserLData = new GridData();
        browserLData.widthHint = 784;
        browserLData.heightHint = 500;
        browser.setLayoutData(browserLData);
        browser.setUrl(object.getHtmlPath());
View Full Code Here

     * @see AbstractInfoView#internalCreatePartControl(Composite)
     */
    @Override
    protected void internalCreatePartControl(final Composite parent) {
        try {
            fBrowser = new Browser(parent, SWT.NONE);
            locationListener = new HandleEdocLinksLocationListener(this);
            fBrowser.addLocationListener(locationListener);
        } catch (final SWTError er) {
            ErlLogger.warn(er);
        }
View Full Code Here

     * @return <code>true</code> if this control is available
     */
    public static boolean isAvailable(final Composite parent) {
        if (!fgAvailabilityChecked) {
            try {
                final Browser browser = new Browser(parent, SWT.NONE);
                browser.dispose();
                fgIsAvailable = true;

                final Slider sliderV = new Slider(parent, SWT.VERTICAL);
                final Slider sliderH = new Slider(parent, SWT.HORIZONTAL);
                final int width = sliderV.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
View Full Code Here

TOP

Related Classes of org.eclipse.swt.browser.Browser

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.