Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Link.addSelectionListener()


  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


    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);
      };
    });
View Full Code Here

    });

    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

        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);
View Full Code Here

                .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());
            }
        });
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

    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

        }
       
        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

                    shell.setLayout(layout);
                    Link link = new Link(shell, SWT.NONE);
                    link.setText("<A>close</A>");
                    GridData data = new GridData(SWT.RIGHT, SWT.CENTER, false, false);
                    link.setLayoutData(data);
                    link.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                            shell.close();
                        }
                    });
                    Group group = new Group(shell, SWT.NONE);
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.