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 284809 Details for
Bug 568931
[Linux] SWT.EraseItem Listener not working in Table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Snippet
TestTableBug.java (text/plain), 1.31 KB, created by
Phil Beauvoir
on 2020-11-18 11:59:20 EST
(
hide
)
Description:
Snippet
Filename:
MIME Type:
Creator:
Phil Beauvoir
Created:
2020-11-18 11:59:20 EST
Size:
1.31 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Rectangle; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Event; >import org.eclipse.swt.widgets.Listener; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableItem; > >public class TestTableBug { > > public static void main(String[] args) { > Display display = new Display(); > > Shell shell = new Shell(display); > shell.setText("Test"); > > Table table = new Table(shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); > for(int i = 0; i < 12; i++) { > TableItem item = new TableItem(table, 0); > item.setText("Item " + i); > } > > Rectangle clientArea = shell.getClientArea(); > table.setBounds(clientArea.x, clientArea.y, 200, 200); > shell.setSize(200, 200); > > table.addListener(SWT.EraseItem, new Listener() { > @Override > public void handleEvent(Event event) { > event.detail &= ~SWT.SELECTED; > event.detail &= ~SWT.HOT; > } > }); > > 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 568931
: 284809