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 217672 Details for
Bug 383189
Warnings and Errors in the SWT Combo when running on Linux
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
ComboTest.java (text/x-java), 1.78 KB, created by
Krzysztof Daniel
on 2012-06-21 04:30:23 EDT
(
hide
)
Description:
Snippet
Filename:
MIME Type:
Creator:
Krzysztof Daniel
Created:
2012-06-21 04:30:23 EDT
Size:
1.78 KB
patch
obsolete
>package com.redhat.eclipse; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.RowLayout; >import org.eclipse.swt.widgets.Combo; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class ComboTest { > > /** > * @param args > */ > public static void main(String[] args) { > final Display display = Display.getDefault(); > Shell shell = new Shell(); > shell.setText("Close to end"); > shell.open(); > final Shell[] s = new Shell[]{null}; > new Thread(new Runnable() { > > @Override > public void run() { > for(int i = 0; i < 100; i++){ > display.asyncExec(new Runnable(){ > > @Override > public void run() { > s[0] = createStructure(); > s[0].open(); > s[0].layout(); > > } > > }); > try { > Thread.sleep(3000); > } catch (InterruptedException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > display.asyncExec(new Runnable(){ > > @Override > public void run() { > > s[0].close(); > } > > }); > } > > } > }).start(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > } > > private static Shell createStructure() { > Shell s = newShell(null); > s.setSize(200, 100); > createCombo(s, SWT.READ_ONLY); > createCombo(s, SWT.SINGLE); > return s; > } > > private static void createCombo(Composite c, int flag) { > Combo c1 = new Combo(c, flag); > c1.add("1243"); > c1.add("A very yuyyyy lonmg text"); > c1.add("A very yuyyyy lonmg text"); > c1.add("A very yuyyyy lonmg text"); > c1.add("A very yuyyyy lonmg text"); > c1.add("A very yuyyyy lonmg text"); > } > > private static Shell newShell(Shell parent) { > Shell s = new Shell(parent); > s.setLayout(new RowLayout()); > return s; > } > >}
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 383189
: 217672