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 241262 Details for
Bug 431219
No busy cursor from menu item action
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.
BusyIndicator test snippet
App.java (text/x-java), 2.01 KB, created by
pawcik
on 2014-03-26 07:03:26 EDT
(
hide
)
Description:
BusyIndicator test snippet
Filename:
MIME Type:
Creator:
pawcik
Created:
2014-03-26 07:03:26 EDT
Size:
2.01 KB
patch
obsolete
>package swt; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.BusyIndicator; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Menu; >import org.eclipse.swt.widgets.MenuItem; >import org.eclipse.swt.widgets.Shell; > >public class App { > public static void main(String[] args) { > final Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new GridLayout(1, false)); > Menu appMenuBar = display.getMenuBar(); > if (appMenuBar == null) { > appMenuBar = new Menu(shell, SWT.BAR); > shell.setMenuBar(appMenuBar); > } > MenuItem file = new MenuItem(appMenuBar, SWT.CASCADE); > file.setText("File"); > Menu dropdown = new Menu(appMenuBar); > file.setMenu(dropdown); > MenuItem busy = new MenuItem(dropdown, SWT.PUSH); > busy.setText("Busy"); > busy.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > BusyIndicator.showWhile(Display.getDefault(), new LongOperation()); > } > }); > Button b = new Button(shell, SWT.PUSH); > b.setText("Test"); > b.addSelectionListener(new SelectionAdapter() { > > @Override > public void widgetSelected(SelectionEvent e) { > BusyIndicator.showWhile(Display.getDefault(), new LongOperation()); > } > > }); > shell.pack(); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > display.dispose(); > } > > static class LongOperation implements Runnable { > > @Override > public void run() { > for (int i = 0; i < 400000; i++) { > System.out.println(i); > } > } > > } >}
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 431219
: 241262