lblNewLabel.addSelectionListener(openUrl); lblNewLabel.setFont(SWTResourceManager.getFont("Arial", 20, SWT.NORMAL)); lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); link.addSelectionListener(openUrl); link.setText("<a href=\"mailto:caoxinyu@gmail.com\">" + RedisClient.i18nFile.getText(I18nFile.CAOXINYU) + "</a>"); new Label(composite, SWT.NONE); link_1.addSelectionListener(openUrl); link_1.setText("<a href=\"https://github.com/caoxinyu/redisclient/issues?state=open\">" + RedisClient.i18nFile.getText(I18nFile.CLICK) + "</a>"); new Label(composite, SWT.NONE); link_2.addSelectionListener(openUrl); link_2.setText("<a href=\"https://github.com/caoxinyu/RedisClient/stargazers\">" + RedisClient.i18nFile.getText(I18nFile.CLICK) + "</a>");
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private void createPreferencePageLink(Composite composite, String label, final Map targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private void addLink(Composite parent) { Link link= new Link(parent, SWT.NONE); link.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); link.setText(ReorgMessages.RenameInformationPopup_OptionsLink); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { activateEditor(); fRenameLinkedMode.startFullDialog(); } }); }
private Link createLink(Composite composite, ListenerMix listener) { Link link= new Link(composite, SWT.WRAP); GridData layoutData= new GridData(SWT.FILL, SWT.CENTER, true, false); layoutData.widthHint= convertWidthInCharsToPixels(80); link.setLayoutData(layoutData); link.addSelectionListener(listener); return link; }
private void addLink(Composite parent) { Link link= new Link(parent, SWT.NONE); link.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); link.setText(ReorgMessages.RenameInformationPopup_OptionsLink); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { activateEditor(); fRenameLinkedMode.startFullDialog(); } }); }
private void createRemindSection(Composite parent) { remindLink = new Link(parent, SWT.MULTI | SWT.WRAP | SWT.RIGHT); updateRemindText(); remindLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), PreferenceConstants.PREF_PAGE_AUTO_UPDATES, null, null); dialog.open(); } }); remindLink.setLayoutData(new GridData(GridData.FILL_BOTH)); }
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false, 2, 1)); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private Link createLink(Composite composite, ListenerMix listener) { Link link= new Link(composite, SWT.WRAP); GridData layoutData= new GridData(SWT.FILL, SWT.CENTER, true, false); layoutData.widthHint= convertWidthInCharsToPixels(80); link.setLayoutData(layoutData); link.addSelectionListener(listener); return link; }
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false, 2, 1)); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private void addLink(Composite composite, String text, int indent) { GridData gd; final Link link= new Link(composite, SWT.NONE); link.setText(text); gd= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gd.widthHint= 300; // don't get wider initially gd.horizontalSpan= 2; gd.horizontalIndent= indent; link.setLayoutData(gd); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, null); } }); }
public static Link createLink(Composite parent,int style ,String text){ Link link = new Link( parent, style ); link.setText(text); link.addSelectionListener(new OpenUrlListener()); return link; }
public static Link createPreferenceLink(final Shell shell, Composite parent, final String pageId, final String[] displayIds, String message) { Link link = new Link(parent, SWT.NONE); link.setText(getLinkLabel(pageId, message)); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(shell, pageId, displayIds, null); prefDialog.open(); } }); return link; }
protected Control createExtendedContentArea(Composite parent) { Composite displayArea = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(displayArea); Link link = new Link(displayArea, SWT.NONE); link.setText(UIText.CommitSelectionDialog_LinkSearch); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { close(); NewSearchUI.openSearchDialog(PlatformUI.getWorkbench() .getActiveWorkbenchWindow(), CommitSearchPage.ID); } }); return displayArea; }
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() { @Override public void widgetSelected(SelectionEvent e) { helpPressed(); } }); return link; }
protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddGetterSetterAction_template_link_description); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.GETTERCOMMENT_ID); } }); link.setToolTipText(ActionMessages.AddGetterSetterAction_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; } }
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) { doLinkActivated((Link) e.widget); } }); return link; }
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(widgetSelectedAdapter(e -> helpPressed())); return link; }
public void setStatusWithCallback(final String statusMessage, final SelectionListener listener) { disposeChildren(status); final Link link = new Link(status, SWT.NONE); link.setText(statusMessage); link.setBackground(link.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); link.addSelectionListener(listener); layout(); } }