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 152574 Details for
Bug 295582
[Widgets] READ_ONLY Text widget consumes mousewheel events
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Interactive test case
WhereDoAllTheMouseWheelEventsGo.java (text/plain), 2.01 KB, created by
Tim Moore
on 2009-11-19 07:53:09 EST
(
hide
)
Description:
Interactive test case
Filename:
MIME Type:
Creator:
Tim Moore
Created:
2009-11-19 07:53:09 EST
Size:
2.01 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.ScrolledComposite; >import org.eclipse.swt.custom.StyledText; >import org.eclipse.swt.graphics.Point; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Text; > >/** > * Test for mouse wheel scrolling behavior. > */ >public class WhereDoAllTheMouseWheelEventsGo { > > private WhereDoAllTheMouseWheelEventsGo() { > } > > private static final Point SIZE = new Point(300, 200); > > public static void main(final String[] args) { > final Display display = new Display(); > final Shell shell = new Shell(display); > shell.setSize(SIZE); > shell.setLayout(new GridLayout(1, true)); > > final ScrolledComposite sc = new ScrolledComposite(shell, SWT.V_SCROLL); > sc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > sc.setLayout(new GridLayout(1, true)); > > final Composite c = new Composite(sc, SWT.NONE); > c.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > c.setLayout(new GridLayout(1, true)); > > final Text text = new Text(c, SWT.NONE); > text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); > text.setText("Writable 'Text' does not steal mouse wheel events"); > > final Text roText = new Text(c, SWT.READ_ONLY); > roText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); > roText.setText("Read only 'Text' steals mouse wheel events"); > > final StyledText styledText = new StyledText(c, SWT.READ_ONLY); > styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); > styledText.setText("Read only 'StyledText' does not steal mouse wheel events."); > > c.setSize(SIZE.x, SIZE.y * 2); > sc.setContent(c); > > 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 295582
: 152574