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 221296 Details for
Bug 390007
Table.select reveals the selection on Linux, but not on other platforms
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 that reproduces the problem
Table_ScrollOnSelection.java (text/x-java), 1.40 KB, created by
Nam Quang Tran
on 2012-09-20 09:28:10 EDT
(
hide
)
Description:
Snippet that reproduces the problem
Filename:
MIME Type:
Creator:
Nam Quang Tran
Created:
2012-09-20 09:28:10 EDT
Size:
1.40 KB
patch
obsolete
>package test.table; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableItem; > >public final class Table_ScrollOnSelection { > > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new GridLayout(1, false)); > > Button bt = new Button(shell, SWT.PUSH); > bt.setText("Select Last Item"); > bt.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, true, false)); > > final Table table = new Table(shell, SWT.BORDER | SWT.V_SCROLL | SWT.SINGLE); > table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > > for (int i = 0; i < 100; i++) { > TableItem item = new TableItem(table, SWT.NONE); > item.setText("Test " + i); > } > > bt.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > table.select(new int[] {table.getItemCount() - 1}); > table.select(table.getItemCount() - 1); > } > }); > > shell.setSize(640, 480); > 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 390007
: 221296