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 36439 Details for
Bug 132241
Display.readAndDispatch hangs after Display.post of MouseDown to Table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Table snippet
WiggleNeeded.java (text/plain), 1.86 KB, created by
Brad Reynolds
on 2006-03-16 15:14:47 EST
(
hide
)
Description:
Table snippet
Filename:
MIME Type:
Creator:
Brad Reynolds
Created:
2006-03-16 15:14:47 EST
Size:
1.86 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Point; >import org.eclipse.swt.layout.RowLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Event; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableItem; > >public class WiggleNeeded >{ > Display display; > > void run() > { > display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new RowLayout()); > > Table table = new Table(shell, SWT.NONE); > TableItem item = new TableItem(table, SWT.NONE); > item.setText("testMoveToValidItemSingleItem"); //$NON-NLS-1$ > > shell.setSize(200, 200); > shell.open(); > flushEvents(); > > Point point = table.toDisplay(20, 5); > int x = point.x; > int y = point.y; > > System.out.println("posting mouse move..."); //$NON-NLS-1$ > Event event = new Event(); > event.type = SWT.MouseMove; > event.x = x; > event.y = y; > display.post(event); > System.out.println("posted"); //$NON-NLS-1$ > > flushEvents(); > > System.out.println("posting mouse down..."); //$NON-NLS-1$ > event = new Event(); > event.type = SWT.MouseDown; > event.button = 1; > display.post(event); > System.out.println("posted"); //$NON-NLS-1$ > > flushEvents(); > > System.out.println("posting mouse up..."); //$NON-NLS-1$ > event = new Event(); > event.type = SWT.MouseUp; > event.button = 1; > display.post(event); > System.out.println("posted"); //$NON-NLS-1$ > > while (!shell.isDisposed()) > { > if (!display.readAndDispatch()) > display.sleep(); > } > > display.dispose(); > } > > private void flushEvents() { > System.out.println("flushEvents start..."); //$NON-NLS-1$ > while (display.readAndDispatch()); > System.out.println("flushEvents done."); //$NON-NLS-1$ > } > > public static void main(String[] args) > { > new WiggleNeeded().run(); > } >}
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 132241
: 36439 |
36440