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 287747 Details for
Bug 577875
[GTK3] MouseWheel event sent with event.count == 0 causing jumpy scrolling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Snippet
MouseWheelTest.java (text/plain), 1.28 KB, created by
Thomas Singer
on 2021-12-30 03:46:41 EST
(
hide
)
Description:
Snippet
Filename:
MIME Type:
Creator:
Thomas Singer
Created:
2021-12-30 03:46:41 EST
Size:
1.28 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Point; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class MouseWheelTest { > > private static int pos; > > public static void main(String[] args) { > final Display display = new Display(); > > final Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > > final Composite composite = new Composite(shell, 0); > composite.addListener(SWT.MouseWheel, event -> { > pos += event.count; > System.out.println("event.count = " + event.count); > composite.redraw(); > }); > composite.addListener(SWT.Paint, event -> { > final Point size = composite.getSize(); > final int height = event.gc.getFontMetrics().getHeight(); > int i = pos; > for (int y = 0; y < size.y; y += height) { > event.gc.drawString(String.valueOf(i++), 0, y); > } > }); > > shell.setSize(400, 300); > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > 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 577875
: 287747