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 138948 Details for
Bug 279972
[Tree] ENTER does not notify widget default selected
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 bug
Application.java (text/plain), 2.13 KB, created by
Elias Volanakis
on 2009-06-11 12:33:28 EDT
(
hide
)
Description:
Snippet to reproduce bug
Filename:
MIME Type:
Creator:
Elias Volanakis
Created:
2009-06-11 12:33:28 EDT
Size:
2.13 KB
patch
obsolete
>package rap.wrap; > >import org.eclipse.rwt.lifecycle.IEntryPoint; >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableItem; >import org.eclipse.swt.widgets.Tree; >import org.eclipse.swt.widgets.TreeItem; >import org.eclipse.ui.PlatformUI; > >public class Application implements IEntryPoint { > > public int createUI() { >// return tableSelectionDemo(); > return treeSelectionDemo(); > } > > /* > * Broken > */ > public int treeSelectionDemo() { > Display display = PlatformUI.createDisplay(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > > Tree tree = new Tree(shell, SWT.SINGLE); > for(int i = 0; i < 20; i++) { > new TreeItem(tree, SWT.NONE).setText("treeitem " + i); > } > > tree.addSelectionListener(new SelectionAdapter() { > public void widgetDefaultSelected(SelectionEvent e) { > System.out.println("widgetDefaultSelected: " + e.widget); > } > }); > > shell.pack(); > shell.open(); > > while(!shell.isDisposed()) { > if(!display.readAndDispatch()) { > display.sleep(); > } > } > > return 0; > } > > /* > * Works > */ > private int tableSelectionDemo() { > Display display = PlatformUI.createDisplay(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > > Table table = new Table(shell, SWT.SINGLE); > for(int i = 0; i < 20; i++) { > new TableItem(table, SWT.NONE).setText("tableitem " + i); > } > > table.addSelectionListener(new SelectionAdapter() { > public void widgetDefaultSelected(SelectionEvent e) { > System.out.println("widgetDefaultSelected: " + e.widget); > } > }); > > shell.pack(); > shell.open(); > > while(!shell.isDisposed()) { > if(!display.readAndDispatch()) { > display.sleep(); > } > } > > return 0; > } >}
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 279972
: 138948 |
139016
|
140213