本文整理汇总了Java中org.eclipse.ui.forms.widgets.ImageHyperlink.setToolTipText方法的典型用法代码示例。如果您正苦于以下问题:Java ImageHyperlink.setToolTipText方法的具体用法?Java ImageHyperlink.setToolTipText怎么用?Java ImageHyperlink.setToolTipText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.forms.widgets.ImageHyperlink
的用法示例。
在下文中一共展示了ImageHyperlink.setToolTipText方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControls
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
private void createControls() {
Composite cloudForgeComposite = new Composite(this, SWT.NULL);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
cloudForgeComposite.setLayout(layout);
GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
cloudForgeComposite.setLayoutData(data);
ImageHyperlink cloudForgeLink = new ImageHyperlink(cloudForgeComposite, SWT.NONE);
cloudForgeLink.setImage(SVNUIPlugin.getPlugin().getImageDescriptor(ISVNUIConstants.IMG_CLOUDFORGE).createImage());
cloudForgeLink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent evt) {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(SIGNUP_URL));
} catch (Exception e) {
MessageDialog.openError(getShell(), "Sign-up for CloudForge", e.getMessage());
}
}
});
cloudForgeLink.setToolTipText(SIGNUP_URL);
}
示例2: createHelpWidget
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
protected void createHelpWidget(final Composite parent, final Control control, String helpId) {
final ImageHyperlink helpWidget = toolkit.createImageHyperlink(parent, SWT.CENTER);
Image defaultImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_LCL_LINKTO_HELP);
helpWidget.setImage(defaultImage);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(helpWidget);
helpWidget.setToolTipText(JFaceResources.getString(IDialogLabelKeys.HELP_LABEL_KEY));
helpWidget.addMouseListener(new MouseAdapter() {
public void mouseDown(MouseEvent e) {
control.setFocus();
PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
}
});
GridDataFactory.fillDefaults().applyTo(helpWidget);
helpWidget.setEnabled(true);
setHelpContext(control, helpId);
}
示例3: createFolderLink
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
private void createFolderLink(Composite composite) {
UI.formLabel(composite, tk, "Location");
ImageHyperlink link = tk.createImageHyperlink(composite, SWT.TOP);
File folder = ShapeFileUtils.getFolder(method());
link.setText(Strings.cut(folder.getAbsolutePath(), 75));
link.setImage(Icon.FOLDER.get());
link.setForeground(Colors.linkBlue());
link.setToolTipText(folder.getAbsolutePath());
Controls.onClick(link, e -> {
try {
if (folder.exists() && folder.isDirectory())
Desktop.getDesktop().open(folder);
} catch (Exception ex) {
log.error("failed to open shape-file folder", ex);
}
});
}
示例4: createCategoryViewer
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
private void createCategoryViewer(Composite client) {
Composite container = toolkit.createComposite(client);
UI.gridLayout(container, App.isCommentingEnabled() ? 3 : 2, 10, 0);
UI.gridData(container, true, false);
new Label(container, SWT.NONE).setText(M.ImpactCategory);
categoryViewer = new ImpactCategoryViewer(container);
CategoryChange categoryChange = new CategoryChange();
categoryViewer.addSelectionChangedListener(categoryChange);
categoryViewer.setInput(getDescriptorList());
editor.getEventBus().register(categoryChange);
commentControl = new ImageHyperlink(container, SWT.NONE);
UI.gridData(commentControl, false, false).verticalAlignment = SWT.TOP;
Controls.onClick(commentControl, (e) -> {
ImpactCategoryDescriptor category = categoryViewer.getSelected();
if (category == null)
return;
String path = CommentPaths.get(category) + ".impactFactors";
if (!editor.hasComment(path))
return;
new CommentDialog(path, editor.getComments()).open();
});
if (!App.isCommentingEnabled())
return;
commentControl.setImage(Icon.SHOW_COMMENTS.get());
commentControl.setToolTipText(M.ShowComments);
}
示例5: ColumnHeader
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
public ColumnHeader(Composite parent, AgendaWeek aw){
super(parent, SWT.NONE);
view = aw;
if (UiDesk.getImage(IMG_PERSONS_NAME) == null) {
UiDesk.getImageRegistry().put(IMG_PERSONS_NAME,
Activator.getImageDescriptor(IMG_PERSONS_PATH));
}
ihRes = new ImageHyperlink(this, SWT.NONE);
ihRes.setImage(UiDesk.getImage(IMG_PERSONS_NAME));
ihRes.setToolTipText(Messages.ColumnHeader_selectDaysToDisplay);
ihRes.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e){
new SelectDaysDlg().open();
}
});
}
示例6: ColumnHeader
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
ColumnHeader(Composite parent, AgendaParallel v){
super(parent, SWT.NONE);
view = v;
if (UiDesk.getImage(IMG_PERSONS_NAME) == null) {
UiDesk.getImageRegistry().put(IMG_PERSONS_NAME,
Activator.getImageDescriptor(IMG_PERSONS_PATH));
}
ihRes = new ImageHyperlink(this, SWT.NONE);
ihRes.setImage(UiDesk.getImage(IMG_PERSONS_NAME));
ihRes.setToolTipText(Messages.ColumnHeader_selectMandatorToShow);
ihRes.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e){
new SelectResourceDlg().open();
}
});
}
示例7: renderFlowLink
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
private void renderFlowLink(Image image, Composite composite,
ProcessDescriptor d) {
ImageHyperlink link = new ImageHyperlink(composite, SWT.TOP);
link.setText(Labels.getDisplayName(d));
link.setToolTipText(Labels.getDisplayInfoText(d));
link.setImage(image);
link.setForeground(Colors.linkBlue());
Controls.onClick(link, e -> {
ProcessDao dao = new ProcessDao(database);
Process p = dao.getForId(d.getId());
App.openEditor(p);
});
}
示例8: initControl
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
private void initControl(Composite parent, FormToolkit toolkit) {
if (!App.isCommentingEnabled() || comments == null || !comments.hasPath(path)) {
UI.filler(parent, toolkit);
return;
}
ImageHyperlink control = new ImageHyperlink(parent, SWT.NONE);
UI.gridData(control, false, false).verticalAlignment = SWT.TOP;
Controls.onClick(control, (e) -> {
new CommentDialog(path, comments).open();
});
control.setImage(Icon.SHOW_COMMENTS.get());
control.setToolTipText(M.Comment);
}
示例9: setWidgetToolTipText
import org.eclipse.ui.forms.widgets.ImageHyperlink; //导入方法依赖的package包/类
@Override
protected void setWidgetToolTipText(ImageHyperlink widget, String toolTipText) {
widget.setToolTipText(toolTipText);
}