Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Link


    Dialog.applyDialogFont(composite);
    return composite;
  }

  private Link createLink(Composite composite, String text) {
    Link link = new Link(composite, SWT.NONE);
    link.setFont(composite.getFont());
    link.setText("<A>" + text + "</A>"); //$NON-NLS-1$//$NON-NLS-2$
    link.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        doLinkActivated((Link) e.widget);
      }

      public void widgetDefaultSelected(SelectionEvent e) {
View Full Code Here


    sourceFolderGroup.setLayoutData(gd);
    sourceFolderGroup.setText("PHP executable");

    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    gridData.horizontalSpan = 3;
    Link prefLink = new Link(sourceFolderGroup, SWT.WRAP);
    prefLink.setText("You can add PHP binaries in the <a>PHP Executables</a> preference page.");
    prefLink.setLayoutData(gridData);

    prefLink.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer)getPreferenceContainer();
        container.openPage(PHPsPreferencePage.ID, null);
      };
    });

    Link helpLink = new Link(sourceFolderGroup, SWT.WRAP);
    helpLink.setLayoutData(gridData);
    helpLink.setText("See <a>phptherightway.com</a> if you need help installing the PHP cli.");
    helpLink.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        try {
          PlatformUI
              .getWorkbench()
              .getBrowserSupport()
View Full Code Here

        }

    }

    private Link createLink(final Composite composite, final String theText) {
        final Link link = new Link(composite, SWT.NONE);
        link.setFont(composite.getFont());
        link.setText("<A>" + theText + "</A>"); //$NON-NLS-1$//$NON-NLS-2$
        link.addSelectionListener(new SelectionListener() {
            @Override
            public void widgetSelected(final SelectionEvent e) {
                doLinkActivated((Link) e.widget);
            }
View Full Code Here

        }

    }

    private Link createLink(final Composite composite, final String text) {
        final Link link = new Link(composite, SWT.NONE);
        link.setFont(composite.getFont());
        link.setText("<A>" + text + "</A>"); //$NON-NLS-1$//$NON-NLS-2$
        link.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(final SelectionEvent e) {
                doLinkActivated((Link) e.widget);
            }
        });
View Full Code Here

        GridLayout layout = new GridLayout();
        layout.marginHeight = 0;
        layout.marginWidth = 0;
        colorComposite.setLayout(layout);

        final Link link = new Link(colorComposite, SWT.NONE);
        link.setText(PreferencesMessages.ErlEditorColoringConfigurationBlock_link);
        link.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(final SelectionEvent e) {
                PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null,
                        null);
            }
        });

        final GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
        gridData.widthHint = 150;
        gridData.horizontalSpan = 2;
        link.setLayoutData(gridData);

        addFiller(colorComposite, 1);

        Label label;
        label = new Label(colorComposite, SWT.LEFT);
View Full Code Here

        lblNewLabel_7
                .setText("Erlide can't connect to the backend if the network is not configured properly.\n\n"
                        + "If the hostname that Erlang detects can't be pinged, you need to reconfigure (usually by adding the name to /etc/hosts or similar)");
        new Label(parent, SWT.NONE);

        final Link link = new Link(parent, SWT.NONE);
        link.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(final SelectionEvent e) {
                Program.launch(link.getToolTipText());
            }
        });
        link.setText("<a>Detailed troubleshooting information</a>");
        link.setToolTipText("https://github.com/erlide/erlide/wiki/Troubleshooting");

        final Label lblWarning = new Label(parent, SWT.NONE);
        final boolean showWarning = System.getProperty("erlide.long.name") != null
                || System.getProperty("erlide.short.name") != null;
        lblWarning.setVisible(showWarning);
View Full Code Here

        final Label textv = new Label(composite, SWT.NONE);
        textv.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
        final String version = ErlangPlugin.getDefault().getCore().getFeatureVersion();
        textv.setText("    version " + version);

        final Link erlideorgLink = new Link(composite, SWT.NONE);
        erlideorgLink.setText(PreferenceMessages.ErlangPreferencePage_3);

        final Link updateLink = new Link(composite, SWT.NONE);
        updateLink.setText(PreferenceMessages.ErlangPreferencePage_4);
        new Label(panel, SWT.NONE);

        final Button reportButton = new Button(panel, SWT.NONE);
        reportButton.addSelectionListener(new SelectionAdapter() {
            @Override
View Full Code Here

  /*
   * Creates a help link. This is used when there is no help image
   * available.
   */
  private Link createHelpLink(Composite parent) {
    Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
        ((GridLayout) parent.getLayout()).numColumns++;
    link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    link.setText("<a>"+IDialogConstants.HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$
    link.setToolTipText(IDialogConstants.HELP_LABEL);
    link.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
        helpPressed();
            }
        });
    return link;
View Full Code Here

        @Override
        protected Control createDialogArea(final Composite parent) {
            final Composite composite = (Composite) super.createDialogArea(parent);

            final Link url1 = new Link(composite, SWT.BORDER);
            url1.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
                    | GridData.HORIZONTAL_ALIGN_FILL));

            url1.setText(message);

            return composite;
        }
View Full Code Here

                labelInfo.setForeground(this.getInformationColor());
            }
            labelInfo.setText(information);
        }
       
        Link link = new Link(container, SWT.SHADOW_NONE);
        link.setText("<a>" + url + "</a>");
        //添加鼠标点击事件
        link.addSelectionListener(new SelectionAdapter(){
          public void widgetSelected(SelectionEvent event){
            //鼠标点击链接后的动作...
            try {
                IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
                support.getExternalBrowser().openURL(new URL(url));
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.