當前位置: 首頁>>代碼示例>>Java>>正文


Java Link.setToolTipText方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.Link.setToolTipText方法的典型用法代碼示例。如果您正苦於以下問題:Java Link.setToolTipText方法的具體用法?Java Link.setToolTipText怎麽用?Java Link.setToolTipText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.Link的用法示例。


在下文中一共展示了Link.setToolTipText方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createUI_Field_Text

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
private int createUI_Field_Text(final Composite parent) {

		{
			/*
			 * Link: Fulltext search hint
			 */
			final Link link = new Link(parent, SWT.NONE);
			link.setText(Messages.Slideout_TourFilter_Link_TextSearchHint);
			link.setToolTipText(Messages.Slideout_TourFilter_Link_TextSearchHint_Tooltip);
			link.addSelectionListener(new SelectionAdapter() {
				@Override
				public void widgetSelected(final SelectionEvent e) {
					Util.showView(SearchView.ID, true);
				}
			});
		}

		return 1;
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:20,代碼來源:SlideoutTourFilter.java

示例2: createLinkControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
@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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:AddDelegateMethodsAction.java

示例3: createLinkControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
@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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:AddGetterSetterAction.java

示例4: createLinkControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
@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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:AddUnimplementedConstructorsAction.java

示例5: createLinkControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
@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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:GenerateConstructorUsingFieldsSelectionDialog.java

示例6: createLinkControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
@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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:OverrideMethodDialog.java

示例7: createLinkControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:18,代碼來源:SortMembersMessageDialog.java

示例8: createUI_50_CustomColors

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
private void createUI_50_CustomColors(final Composite parent) {

		// Link: Custom colors
		{
			final Link linkCustomColor = new Link(parent, SWT.NONE);
			GridDataFactory.fillDefaults().grab(true, false).indent(0, 0).applyTo(linkCustomColor);
			linkCustomColor.setText(Messages.Color_Chooser_Link_CustomColors);
			linkCustomColor.setToolTipText(Messages.Color_Chooser_Link_CustomColors_Tooltip);

			linkCustomColor.addSelectionListener(new SelectionAdapter() {
				@Override
				public void widgetSelected(final SelectionEvent e) {
					UI.openControlMenu(linkCustomColor);
				}
			});

			/*
			 * create link context menu
			 */
			final MenuManager menuMgr = new MenuManager();

			menuMgr.setRemoveAllWhenShown(true);
			menuMgr.addMenuListener(new IMenuListener() {
				public void menuAboutToShow(final IMenuManager menuManager) {
					fillContextMenu(menuManager);
				}
			});

			linkCustomColor.setMenu(menuMgr.createContextMenu(linkCustomColor));
		}

		createUI_52_CustomColors_Colors(parent);
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:34,代碼來源:ColorChooser.java

示例9: createLocalizationLink

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
private Link createLocalizationLink(Composite parent) {
	Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
       ((GridLayout) parent.getLayout()).numColumns++;
	link.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, false, false));
	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) {
           	localizationPressed();
           }
       });
	return link;
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:14,代碼來源:LocalizableTrayDialog.java

示例10: createHelpLink

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
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;
}
 
開發者ID:ghillairet,項目名稱:gef-gwt,代碼行數:14,代碼來源:TrayDialog.java

示例11: createHelpLink

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
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;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:16,代碼來源:AbstractPopupSheet.java

示例12: EntryLeftBanner

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
/**
 * Constructor.
 * 
 * @param parent
 *            parent composite
 * @param keyTree
 *            key tree
 */
public EntryLeftBanner(Composite parent, final AbstractI18NEntry i18NEntry) {
    super(parent, SWT.NONE);

    RowLayout layout = new RowLayout();
    setLayout(layout);
    layout.marginBottom = 0;
    layout.marginLeft = 0;
    layout.marginRight = 0;
    layout.marginTop = 0;

    final IAction foldAction = new FoldingAction(i18NEntry);
    new ActionButton(this, foldAction);

    // Button commentButton = new Button(compos, SWT.TOGGLE);
    // commentButton.setImage(UIUtils.getImage("comment.gif"));

    Link localeLabel = new Link(this, SWT.NONE);
    localeLabel.setFont(UIUtils.createFont(localeLabel, SWT.BOLD));

    boolean isEditable = i18NEntry.isEditable();
    localeLabel.setText("<a>"
            + UIUtils.getDisplayName(i18NEntry.getLocale())
            + "</a>"
            + (!isEditable ? " ("  + Messages.editor_readOnly + ")" : ""));

    localeLabel.setToolTipText(MessageFormat.format( Messages.editor_i18nentry_resourcelocation, new Object[] { i18NEntry.getResourceLocationLabel()}));
    localeLabel.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            i18NEntry.getResourceBundleEditor().setActivePage(
                    i18NEntry.getLocale());
        }
    });

    // TODO have "show country flags" in preferences.
    // TODO have text aligned bottom next to flag icon.
    Image countryIcon = loadCountryIcon(i18NEntry.getLocale());
    if (countryIcon != null) {
        Label imgLabel = new Label(this, SWT.NONE);
        imgLabel.setImage(countryIcon);
    }
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:50,代碼來源:EntryLeftBanner.java

示例13: createUI_10_Controls

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
private void createUI_10_Controls(final Composite parent) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridLayoutFactory.fillDefaults().applyTo(container);
		{
			{
				// label: Info
				final Label label = new Label(container, SWT.NONE);
				GridDataFactory.fillDefaults().applyTo(label);
				label.setText(Messages.Dialog_SetTimeZone_Label_Info);
			}

			{
				// radio: Set time zone from geo position
				_rdoSetTimeZone_FromGeo = new Button(container, SWT.RADIO);
				_rdoSetTimeZone_FromGeo.setText(Messages.Dialog_SetTimeZone_Radio_SetTimeZone_FromGeo);
				GridDataFactory.fillDefaults()//
						.indent(0, 10)
						.applyTo(_rdoSetTimeZone_FromGeo);
			}

			{
				/*
				 * Set time zone from list
				 */

				// radio
				_rdoSetTimeZone_FromList = new Button(container, SWT.RADIO);
				_rdoSetTimeZone_FromList.setText(Messages.Dialog_SetTimeZone_Radio_SetTimeZone_FromCombo);

				// content
				final Composite setContainer = new Composite(container, SWT.NONE);
				GridDataFactory.fillDefaults().grab(true, false).applyTo(setContainer);
				GridLayoutFactory.fillDefaults().numColumns(2).applyTo(setContainer);
				{
					{
						// combo
						_comboTimeZone = new Combo(setContainer, SWT.READ_ONLY | SWT.BORDER);
						_comboTimeZone.setVisibleItemCount(50);
						GridDataFactory.fillDefaults()//
								.indent(_pc.convertWidthInCharsToPixels(2), 0)
								.align(SWT.BEGINNING, SWT.FILL)
								.applyTo(_comboTimeZone);

						// fill combobox
						for (final TimeZoneData timeZone : TimeTools.getAllTimeZones()) {
							_comboTimeZone.add(timeZone.label);
						}
					}

					{
						// link: set default

						_linkDefaultTimeZone = new Link(setContainer, SWT.NONE);
						_linkDefaultTimeZone.setText(Messages.Tour_Editor_Link_SetDefautTimeZone);
						_linkDefaultTimeZone.setToolTipText(NLS.bind(
								Messages.Tour_Editor_Link_SetDefautTimeZone_Tooltip,
								TimeTools.getDefaultTimeZoneId()));
						_linkDefaultTimeZone.addSelectionListener(new SelectionAdapter() {
							@Override
							public void widgetSelected(final SelectionEvent e) {

								// select default time zone
								_comboTimeZone.select(TimeTools.getTimeZoneIndex_Default());
							}
						});
					}
				}

				{
					// radio: Remove Time zone
					_rdoSetTimeZone_Remove = new Button(container, SWT.RADIO);
					_rdoSetTimeZone_Remove.setText(Messages.Dialog_SetTimeZone_Radio_RemoveTimeZone);
					GridDataFactory.fillDefaults()//
//						.indent(0, 20)
							.applyTo(_rdoSetTimeZone_Remove);
				}

			}
		}
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:82,代碼來源:DialogSetTimeZone_WizardPage.java

示例14: EntryLeftBanner

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
/**
     * Constructor.
     * @param parent parent composite
     * @param keyTree key tree
     */
    public EntryLeftBanner(
            Composite parent,
            final I18NEntry i18NEntry) {
        super(parent, SWT.NONE);
        
        RowLayout layout = new RowLayout();
        setLayout(layout);
        layout.marginBottom = 0;
        layout.marginLeft = 0;
        layout.marginRight = 0;
        layout.marginTop = 0;
        
        final IAction foldAction = new FoldingAction(i18NEntry);
        new ActionButton(this, foldAction);

//        Button commentButton = new Button(compos, SWT.TOGGLE);
//        commentButton.setImage(UIUtils.getImage("comment.gif"));
        
        
        Link localeLabel = new Link(this, SWT.NONE);
        localeLabel.setFont(UIUtils.createFont(localeLabel, SWT.BOLD));
        
        boolean isEditable = i18NEntry.isEditable();
        localeLabel.setText("<a>" + UIUtils.getDisplayName(
                i18NEntry.getLocale()) + "</a>" + (!isEditable
                        ? " (" +  MessagesEditorPlugin.getString(
                                "editor.readOnly") + ")" : ""));
        
        localeLabel.setToolTipText(
    			MessagesEditorPlugin.getString("editor.i18nentry.resourcelocation",
    					i18NEntry.getResourceLocationLabel())); //$NON-NLS-1$
        
        localeLabel.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                i18NEntry.getResourceBundleEditor().setActivePage(
                        i18NEntry.getLocale());
            }
        });

        //TODO have "show country flags" in preferences.
        //TODO have text aligned bottom next to flag icon.
        Image countryIcon = loadCountryIcon(i18NEntry.getLocale());
        if (countryIcon != null) {
            Label imgLabel = new Label(this, SWT.NONE);
            imgLabel.setImage(countryIcon);
        }
    }
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:53,代碼來源:EntryLeftBanner.java


注:本文中的org.eclipse.swt.widgets.Link.setToolTipText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。