Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Link


  private void initComponents() {

    /* Apply Gridlayout */
    setLayout(LayoutUtils.createGridLayout(1, 5, 1));

    fConditionLabel = new Link(this, SWT.NONE);
    fConditionLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    fConditionLabel.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        IFolderChild selectedChild = null;
View Full Code Here


      Label imgLabel = new Label(fJSInfoBar, SWT.None);
      imgLabel.setImage(OwlUI.getImage(imgLabel, "icons/obj16/warning.gif")); //$NON-NLS-1$
      imgLabel.setBackground(fJSInfoBar.getBackground());
      imgLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, true));

      Link textLink = new Link(fJSInfoBar, SWT.NONE);
      textLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
      textLink.setBackground(fJSInfoBar.getBackground());
      textLink.setText(Messages.WebBrowserView_JS_DISABLED_INFO);
      textLink.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          PreferencesUtil.createPreferenceDialogOn(fBrowser.getControl().getShell(), BrowserPreferencePage.ID, null, Boolean.TRUE).open();
        }
      });
View Full Code Here

    /* Title Message */
    setMessage(Messages.StartupErrorDialog_RSSOWL_CRASHED, IMessageProvider.WARNING);

    /* Crash Report Label */
    Link dialogMessageLabel = new Link(composite, SWT.WRAP);
    dialogMessageLabel.setText(Messages.StartupErrorDialog_CRASH_DIAGNOSE);
    dialogMessageLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
    dialogMessageLabel.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        if ("save".equals(e.text)) //$NON-NLS-1$
          doSaveErrorLog();
        else
          doSendErrorLog();
      }
    });

    /* Recovery Label */
    Link recoveryMessageLabel = new Link(composite, SWT.WRAP);
    recoveryMessageLabel.setText(Messages.StartupErrorDialog_CRASH_ADVISE);
    recoveryMessageLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
    recoveryMessageLabel.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        if ("faq".equals(e.text)) //$NON-NLS-1$
          doOpenFAQ();
        else if ("forum".equals(e.text)) //$NON-NLS-1$
View Full Code Here

    Label infoImg = new Label(infoContainer, SWT.NONE);
    infoImg.setImage(OwlUI.getImage(fResources, "icons/obj16/info.gif")); //$NON-NLS-1$
    infoImg.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    Link infoText = new Link(infoContainer, SWT.WRAP);
    infoText.setText(Messages.ManageLabelsPreferencePage_LABEL_TIP);
    infoText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    infoText.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        NewsFiltersListDialog dialog = NewsFiltersListDialog.getVisibleInstance();
        if (dialog == null) {
          dialog = new NewsFiltersListDialog(getShell());
View Full Code Here

    Composite buttonBar = new Composite(parent, SWT.NONE);
    buttonBar.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    buttonBar.setLayout(layout);

    /* Status Label */
    fStatusLabel = new Link(buttonBar, SWT.NONE);
    applyDialogFont(fStatusLabel);
    fStatusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    if (StringUtils.isSet(fBookmark.getName()))
      fStatusLabel.setText(fBookmark.getName());

View Full Code Here

    Label infoImg = new Label(infoContainer, SWT.NONE);
    infoImg.setImage(OwlUI.getImage(infoImg, "icons/obj16/info.gif")); //$NON-NLS-1$
    infoImg.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    Link infoLink = new Link(infoContainer, SWT.NONE);
    infoLink.setText(Messages.FeedDefinitionPage_IMPORT_WIZARD_TIP);
    infoLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    infoLink.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        new ImportAction().openWizard(getShell(), true);
      }
    });
View Full Code Here

    /* Fill in Update Details */
    showUpdateDescription();

    /* Link to open RSSOwl.org */
    Link link = new Link(updateInfoContainer, SWT.NONE);
    link.setBackground(updateInfoContainer.getBackground());
    link.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
    link.setText(Messages.UpdateDialog_VISIT_HP);
    link.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        BrowserUtils.openLinkExternal("http://www.rssowl.org"); //$NON-NLS-1$
      }
    });
View Full Code Here

    text.setLineSpacing(5);
    return text;
  }

  private Link createHyperLink(Composite container, String text, final String href) {
    Link link = new Link(container, SWT.NONE);
    link.setText("<a>" + text + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
    link.setBackground(container.getBackground());
    link.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        BrowserUtils.openLinkExternal(href);
      }
    });
View Full Code Here

    /* Link to Feedvalidator in case of an error */
    if (bm.isErrorLoading()) {
      new Label(fContainer, SWT.None);

      Link validateLink = new Link(fContainer, SWT.None);
      validateLink.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
      validateLink.setText(Messages.InformationPropertyPage_FIND_OUT_MORE);
      validateLink.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          try {
            URI uri = new URI("http://www.feedvalidator.org/check.cgi?url=" + URIUtils.urlEncode(bm.getFeedLinkReference().getLinkAsText())); //$NON-NLS-1$

            OpenInBrowserAction action = new OpenInBrowserAction();
            action.selectionChanged(null, new StructuredSelection(uri));
            action.run();
          } catch (URISyntaxException ex) {
            Activator.safeLogError(ex.getMessage(), ex);
          }
        }
      });
    }

    /* Feed: Description */
    createLabel(fContainer, Messages.InformationPropertyPage_DESCRIPTION, true);

    fDescriptionLabel = new Label(fContainer, SWT.WRAP);
    fDescriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
    ((GridData) fDescriptionLabel.getLayoutData()).widthHint = 300;

    /* Feed: Homepage */
    createLabel(fContainer, Messages.InformationPropertyPage_HOMEPAGE, true);

    fHomepageLink = new Link(fContainer, SWT.NONE);
    fHomepageLink.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Created */
    if (bm.getCreationDate() != null) {
      createLabel(fContainer, Messages.InformationPropertyPage_CREATED, true);
View Full Code Here

    Composite buttonBar = new Composite(parent, SWT.NONE);
    buttonBar.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    buttonBar.setLayout(layout);

    /* Status Label */
    Link previewLink = new Link(buttonBar, SWT.NONE);
    previewLink.setText("Click <a>here</a> to preview the search results.");
    previewLink.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    previewLink.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        onPreview();
      }
    });
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Link

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.