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 205602 Details for
Bug 361353
IME location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
ImeSWTTest.java
ImeSWTTest.java (text/plain), 1.87 KB, created by
Irina
on 2011-10-20 05:49:08 EDT
(
hide
)
Description:
ImeSWTTest.java
Filename:
MIME Type:
Creator:
Irina
Created:
2011-10-20 05:49:08 EDT
Size:
1.87 KB
patch
obsolete
>package testprogs; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.StyledText; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Shell; > >public class ImeSWTTest >{ > public static void main(String[] args) > { > Display display = Display.getDefault(); > Shell shell = new Shell(display); > GridLayout l = new GridLayout(1, false); > shell.setLayout(l); > > Label label = new Label(shell, SWT.NONE); > label.setText("Text:"); > label.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); > > StyledText st = new StyledText(shell, SWT.WRAP); > GridData ld = new GridData(30, 100); > ld.horizontalAlignment = SWT.FILL; > st.setLayoutData(ld); > > Composite comp = new Composite(shell, SWT.NONE); > l = new GridLayout(10, true); > comp.setLayout(l); > final char[] chars = new char[]{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', > 'q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p', > 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', '\u2191', > 'y', 'x', 'c', 'v', 'b', 'n', 'm', '\u2190', '\u2192', '\u2193'}; > for (int i = 0; i < 4; i++) > { > int n = 10; > for (int j = 0; j < 10; j++) > { > Button b = new Button(comp, SWT.NONE); > b.setText(String.valueOf(chars[i*n + j])); > b.setLayoutData(new GridData(30, 30)); > } > } > > shell.pack(); > 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 361353
:
205600
| 205602