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 288110 Details for
Bug 578929
Add new API for setFocus/forceFocus without activating the shell
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.
Snippet to reproduce
FocusToFrontTest.java (text/plain), 1.74 KB, created by
Thomas Singer
on 2022-02-23 07:47:48 EST
(
hide
)
Description:
Snippet to reproduce
Filename:
MIME Type:
Creator:
Thomas Singer
Created:
2022-02-23 07:47:48 EST
Size:
1.74 KB
patch
obsolete
>import org.eclipse.swt.*; >import org.eclipse.swt.layout.*; >import org.eclipse.swt.widgets.*; > >/** > * @author Thomas Singer > */ >public class FocusToFrontTest { > > public static void main(String[] args) { > final FocusToFrontTest test = new FocusToFrontTest(); > test.openShell(); > test.openShell(); > test.openShell(); > test.show(); > } > > private final Display display = new Display(); > > private int count; > > private FocusToFrontTest() { > } > > private void openShell() { > count++; > final Shell shell = new Shell(display); > final int number = count; > shell.setText("Window " + number); > shell.setLayout(new FillLayout()); > shell.addListener(SWT.Dispose, event -> count--); > shell.addListener(SWT.Activate, event -> System.out.println("Activated " + number)); > shell.setSize(400, 300); > > final Text text1 = new Text(shell, SWT.BORDER | SWT.MULTI); > text1.setText("Loading..."); > > final Text text2 = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.WRAP); > > shell.open(); > > display.timerExec(2_000, () -> { > if (shell.isDisposed()) { > return; > } > > text1.setText(""); > text2.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."); > text2.setFocus(); > }); > } > > private void show() { > while (count > 0) { > 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 578929
:
288110
|
288111