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 185745 Details for
Bug 333130
[BiDi] SLED11+SP1, the messagedialog UI incorrect with RTL, the message should use right alignment.
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.
sample code
Test.java (text/x-java-source), 2.00 KB, created by
yanghang
on 2010-12-23 01:10:29 EST
(
hide
)
Description:
sample code
Filename:
MIME Type:
Creator:
yanghang
Created:
2010-12-23 01:10:29 EST
Size:
2.00 KB
patch
obsolete
> > >import org.eclipse.jface.dialogs.IDialogConstants; >import org.eclipse.jface.dialogs.MessageDialog; >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Shell; > >public class Test { > > protected Shell shell; > > /** > * Launch the application > * @param args > */ > public static void main(String[] args) { > try { > Test window = new Test(); > window.open(); > } catch (Exception e) { > e.printStackTrace(); > } > } > > /** > * Open the window > */ > public void open() { > final Display display = Display.getDefault(); > createContents(); > shell.open(); > shell.layout(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > } > > /** > * Create contents of the window > */ > protected void createContents() { > shell = new Shell(SWT.DIALOG_TRIM|SWT.RIGHT_TO_LEFT); > shell.setSize(500, 375); > shell.setText("FileDialog Test"); > final Label l = new Label(shell, SWT.NONE); > l.setText("this is test"); > l.setBounds(77, 100, 141, 23); > final Button btn1 = new Button(shell, SWT.NONE); > btn1.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent arg0) { > > MessageDialog.openQuestion(shell, "test","ÙØµ Ø§ÙØªØ±Ø´ÙØ"); > > > } > }); > btn1.setText("message dialog 1"); > btn1.setBounds(77, 130, 141, 23); > > > final Button btn = new Button(shell, SWT.NONE); > btn.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent arg0) { > > String[] btns={IDialogConstants.OK_LABEL,IDialogConstants.CANCEL_LABEL}; > MessageDialog md=new MessageDialog(shell,"test",null,"ÙØµ Ø§ÙØªØ±Ø´ÙØ",MessageDialog.QUESTION,btns,1); > md.open(); > } > }); > btn.setText("message dialog 2"); > btn.setBounds(77, 160, 141, 23); > // > } > >}
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 333130
: 185745 |
185746