Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 115190 Details for
Bug 250992
[JFace] ToolTip stops displaying when shell is created on one control but disposed on another.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Updated Snippet
ToolTipSnippet.java (text/x-java), 2.05 KB, created by
Sarah
on 2008-10-15 16:12:14 EDT
(
hide
)
Description:
Updated Snippet
Filename:
MIME Type:
Creator:
Sarah
Created:
2008-10-15 16:12:14 EDT
Size:
2.05 KB
patch
obsolete
>import org.eclipse.jface.window.DefaultToolTip; >import org.eclipse.jface.window.ToolTip; >import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Font; >import org.eclipse.swt.graphics.FontData; >import org.eclipse.swt.graphics.Point; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Shell; > >public class ToolTipSnippet { > > public static void main(String[] args) { > Display display = new Display(); > final Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > > Font font = new Font(Display.getCurrent(), new FontData("Arial", 14, SWT.NORMAL)); > > Composite labelComposite = new Composite(shell, SWT.NONE); > labelComposite.setLayout(new GridLayout(2, false)); > > Label label1 = new Label(labelComposite, SWT.NONE); > label1.setFont(font); > label1.setText("**** Hover on this label ****"); > label1.setForeground(display.getSystemColor(SWT.COLOR_BLACK)); > DefaultToolTip toolTip1 = new DefaultToolTip(label1, ToolTip.NO_RECREATE, false); > toolTip1.setText("Tool Tip 1"); > toolTip1.setShift(new Point(0, 10)); > toolTip1.activate(); > > Label label2 = new Label(labelComposite, SWT.NONE); > label2.setFont(font); > label2.setText("---- Move to this label ----"); > label2.setForeground(display.getSystemColor(SWT.COLOR_BLUE)); > DefaultToolTip toolTip2 = new DefaultToolTip(label2, ToolTip.NO_RECREATE, false); > toolTip2.setText("Tool Tip 2"); > toolTip1.setShift(new Point(0, 10)); > toolTip2.activate(); > > shell.setBounds(0, 0, 550, 100); > shell.layout(); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > font.dispose(); > > display.dispose(); > > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 250992
:
115177
| 115190