本文整理汇总了Java中org.eclipse.jface.window.ToolTip.NO_RECREATE属性的典型用法代码示例。如果您正苦于以下问题:Java ToolTip.NO_RECREATE属性的具体用法?Java ToolTip.NO_RECREATE怎么用?Java ToolTip.NO_RECREATE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jface.window.ToolTip
的用法示例。
在下文中一共展示了ToolTip.NO_RECREATE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFormBookmarkProblems
private void updateFormBookmarkProblems(Bookmark bookmark) {
if (bookmark == null) {
form.setMessage(null);
return;
}
// We do not consider bookmark problems with severity info
Set<BookmarkProblem> problems = bookmarkProblems.getBookmarkProblems(bookmark.getId()).stream()
.filter(bookmarkProblem -> getBookmarkProblemSeverity(bookmarkProblem) != Severity.INFO)
.collect(Collectors.toSet());
if (problems.size() == 0) {
form.setMessage(null);
return;
}
BookmarkProblem firstProblem = problems.iterator().next();
int type = getBookmarkProblemSeverity(firstProblem) == Severity.ERROR ? IMessageProvider.ERROR
: IMessageProvider.WARNING;
form.setMessage(problems.size() == 1 ? "One bookmark problem detected"
: "" + problems.size() + " bookmark problems detected", type);
if (bookmarkProblemsTooltip == null) {
Control control = Stream.of(form.getHead().getChildren()).filter(child -> child instanceof CLabel)
.findFirst().get();
// bug in form ? Without this line, background for the message is
// sometimes gray
control.setBackground(getSite().getShell().getDisplay().getSystemColor(SWT.COLOR_TRANSPARENT));
bookmarkProblemsTooltip = new BookmarkProblemsTooltip(toolkit, control, ToolTip.NO_RECREATE,
bookmarkProblems) {
public Point getLocation(Point tipSize, Event event) {
Rectangle bounds = control.getBounds();
return control.getParent().toDisplay(bounds.x, bounds.y);
}
};
bookmarkProblemsTooltip.setHideOnMouseDown(false);
}
bookmarkProblemsTooltip.setBookmark(bookmark.getId());
}
示例2: ToolTipListener
/**
* Creates a tooltip listener.
*
* @param control the control to attach to
* @param tooltip the tooltip string
*/
public ToolTipListener(Control control, String tooltip) {
this.control = control;
this.tooltip = new DefaultToolTip(control, ToolTip.NO_RECREATE, true);
this.tooltip.setText(tooltip);
this.tooltip.setHideDelay(0);
}
示例3: enableFor
public static final void enableFor(final ColumnViewer viewer) {
new ViewColumnViewerToolTipSupport(viewer, ToolTip.NO_RECREATE, false);
}
示例4: FormToolTip
public FormToolTip(final Control control, final String title, final String... texts) {
super(control, ToolTip.NO_RECREATE, true);
this.title = title;
this.texts = texts;
}
示例5: enableFor
public static final void enableFor(final ColumnViewer viewer) {
new ViewColumnViewerToolTipSupport(viewer, ToolTip.NO_RECREATE,
false);
}
示例6: NoteToolTip
public NoteToolTip(NatTable table) {
super(table, ToolTip.NO_RECREATE, true);
}
示例7: enableFor
public static void enableFor(ColumnViewer viewer) {
new ToolTipSupport(viewer, ToolTip.NO_RECREATE, false);
}
示例8: enableFor
public static void enableFor(ColumnViewer viewer) {
new BytemanAgentViewToolTip(viewer, ToolTip.NO_RECREATE, false);
}
示例9: FindingsNatTableTooltip
public FindingsNatTableTooltip(NatTable natTable, DynamicDataProvider dataProvider){
super(natTable, ToolTip.NO_RECREATE, false);
this.natTable = natTable;
this.dataProvider = dataProvider;
}
示例10: enableFor
/**
* Enable ToolTip support for the viewer by creating an instance from this
* class. To get all necessary informations this support class consults the
* {@link CellLabelProvider}.
*
* @param viewer
* the viewer the support is attached to
*/
public static void enableFor(ColumnViewer viewer) {
new ColumnViewerToolTipSupport(viewer, ToolTip.NO_RECREATE, false);
}