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 124518 Details for
Bug 263427
[Viewers] [JFace] Programmatic selection does not change the focus with virtual tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Test case
Snippet.java (text/plain), 1.46 KB, created by
Clovis
on 2009-02-03 03:44:05 EST
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Clovis
Created:
2009-02-03 03:44:05 EST
Size:
1.46 KB
patch
obsolete
>import org.eclipse.jface.viewers.ILazyContentProvider; >import org.eclipse.jface.viewers.LabelProvider; >import org.eclipse.jface.viewers.StructuredSelection; >import org.eclipse.jface.viewers.TableViewer; >import org.eclipse.jface.viewers.Viewer; >import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class Snippet { > public static void main(final String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > final TableViewer v = new TableViewer(shell, SWT.VIRTUAL); > v.setLabelProvider(new LabelProvider()); > v.setContentProvider(new ILazyContentProvider() { > @Override > public void updateElement(final int index) { > v.replace("Item " + index, index); > } > > @Override > public void dispose() { } > > @Override > public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { } > }); > v.setInput(null); > v.setItemCount(12); > v.getTable().setLinesVisible(true); > v.setSelection(new StructuredSelection("Item 5"), true); > > 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 263427
: 124518 |
125360