Java Code Examples for org.eclipse.swt.widgets.Link#setToolTipText()
The following examples show how to use
org.eclipse.swt.widgets.Link#setToolTipText() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AddDelegateMethodsAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddDelegateMethodsAction_template_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.OVERRIDECOMMENT_ID); } }); link.setToolTipText(ActionMessages.AddDelegateMethodsAction_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; }
Example 2
Source File: AddGetterSetterAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddGetterSetterAction_template_link_description); link.addSelectionListener(new SelectionAdapter() { @Override 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; }
Example 3
Source File: AddUnimplementedConstructorsAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddUnimplementedConstructorsAction_template_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(ActionMessages.AddUnimplementedConstructorsAction_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; }
Example 4
Source File: GenerateConstructorUsingFieldsSelectionDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_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; }
Example 5
Source File: OverrideMethodDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(JavaUIMessages.OverrideMethodDialog_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.OVERRIDECOMMENT_ID); } }); link.setToolTipText(JavaUIMessages.OverrideMethodDialog_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; }
Example 6
Source File: SortMembersMessageDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP | SWT.RIGHT); link.setText(DialogsMessages.SortMembersMessageDialog_description); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openMembersSortOrderPage(); } }); link.setToolTipText(DialogsMessages.SortMembersMessageDialog_link_tooltip); GridData gridData= new GridData(GridData.FILL, GridData.CENTER, true, false); gridData.widthHint= convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);//convertWidthInCharsToPixels(60); link.setLayoutData(gridData); link.setFont(composite.getFont()); return link; }
Example 7
Source File: DialogAbout.java From arx with Apache License 2.0 | 6 votes |
/** * Creates a link. * * @param parent * @param text * @param tooltip * @param url */ private void createLink(Composite parent, String text, String tooltip, final String url){ Link link = new Link(parent, SWT.NONE); link.setLayoutData(SWTUtil.createFillHorizontallyGridData()); link.setText(text); link.setToolTipText(tooltip); link.setBackground(parent.getBackground()); link.addListener (SWT.Selection, new Listener () { public void handleEvent(Event event) { try { Program.launch(url); } catch (Exception e){ /* Ignore*/ } } }); }
Example 8
Source File: AbstractPopupSheet.java From birt with Eclipse Public License 1.0 | 5 votes |
private Link createHelpLink( Composite parent ) { Link link = new Link( parent, SWT.WRAP | SWT.NO_FOCUS ); 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; }
Example 9
Source File: AppEngineDeployPreferencesPanel.java From google-cloud-eclipse with Apache License 2.0 | 4 votes |
private void createProjectIdSection() { Label projectIdLabel = new Label(this, SWT.LEAD); projectIdLabel.setText(Messages.getString("project")); projectIdLabel.setToolTipText(Messages.getString("tooltip.project.id")); GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.BEGINNING).span(1, 2) .applyTo(projectIdLabel); Composite linkComposite = new Composite(this, SWT.NONE); Link createNewProject = new Link(linkComposite, SWT.WRAP); createNewProject.setText(Messages.getString("projectselector.createproject", CREATE_GCP_PROJECT_URL)); createNewProject.setToolTipText(Messages.getString("projectselector.createproject.tooltip")); FontUtil.convertFontToItalic(createNewProject); createNewProject.addSelectionListener(new OpenUriSelectionListener( () -> accountSelector.getSelectedEmail().isEmpty() ? Collections.emptyMap() : Collections.singletonMap("authuser", accountSelector.getSelectedEmail()), new ErrorDialogErrorHandler(getShell()))); GridDataFactory.fillDefaults().applyTo(linkComposite); GridLayoutFactory.fillDefaults().generateLayout(linkComposite); Composite projectSelectorComposite = new Composite(this, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0).applyTo(projectSelectorComposite); GridDataFactory.fillDefaults().grab(true, false).applyTo(projectSelectorComposite); final Text filterField = new Text(projectSelectorComposite, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL); filterField.setMessage(Messages.getString("projectselector.filter")); GridDataFactory.fillDefaults().applyTo(filterField); new Label(projectSelectorComposite, SWT.NONE); // spacer projectSelector = new ProjectSelector(projectSelectorComposite); GridDataFactory.fillDefaults().grab(true, false).hint(SWT.DEFAULT, 200) .applyTo(projectSelector); final Button refreshProjectsButton = new Button(projectSelectorComposite, SWT.NONE); refreshProjectsButton.setImage(refreshIcon); GridDataFactory.swtDefaults().align(SWT.END, SWT.BEGINNING).applyTo(refreshProjectsButton); refreshProjectsButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { refreshProjectsForSelectedCredential(); } }); accountSelector.addSelectionListener( new RefreshProjectOnAccountSelection(refreshProjectsButton)); projectSelector.addSelectionChangedListener( new ProjectSelectorSelectionChangedListener(accountSelector, projectRepository, projectSelector)); filterField.addModifyListener(event -> { projectSelector.setFilter(filterField.getText()); }); }