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 267950 Details for
Bug 514483
[wayland] Launchbar filter closes when clicked
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.
Modification of Snippet 125 to showcase problem with text not being able to focus
file_514483.txt (text/plain), 2.52 KB, created by
Ian Pun
on 2017-04-24 12:30:15 EDT
(
hide
)
Description:
Modification of Snippet 125 to showcase problem with text not being able to focus
Filename:
MIME Type:
Creator:
Ian Pun
Created:
2017-04-24 12:30:15 EDT
Size:
2.52 KB
patch
obsolete
>package org.eclipse.swt.snippets; > >import static org.eclipse.swt.events.SelectionListener.*; > >import org.eclipse.swt.*; >import org.eclipse.swt.layout.*; >import org.eclipse.swt.widgets.*; > >public class Snippet125 { > >public static void main (String [] args) { > Display display = new Display (); > final Shell shell = new Shell (display); > shell.setText("Shell"); > FillLayout fillLayout = new FillLayout(); > fillLayout.marginWidth = 10; > fillLayout.marginHeight = 10; > shell.setLayout(fillLayout); > > Button open = new Button (shell, SWT.PUSH); > open.setText ("Prompt for a String"); > open.addSelectionListener(widgetSelectedAdapter(e -> { > final Shell dialog = new Shell (shell, SWT.TOOL | SWT.ON_TOP | SWT.RESIZE); > dialog.setText("Dialog Shell"); > FormLayout formLayout = new FormLayout (); > formLayout.marginWidth = 10; > formLayout.marginHeight = 10; > formLayout.spacing = 10; > dialog.setLayout (formLayout); > dialog.setLocation(26, 52); > > Label label = new Label (dialog, SWT.NONE); > label.setText ("Type a String:"); > FormData data = new FormData (); > label.setLayoutData (data); > > Button cancel = new Button (dialog, SWT.PUSH); > cancel.setText ("Cancel"); > data = new FormData (); > data.width = 60; > data.right = new FormAttachment (100, 0); > data.bottom = new FormAttachment (100, 0); > cancel.setLayoutData (data); > cancel.addSelectionListener (widgetSelectedAdapter(event -> { > System.out.println("User cancelled dialog"); > dialog.close (); > })); > > final Text text = new Text(dialog, SWT.SINGLE | SWT.BORDER | SWT.SEARCH > | SWT.ICON_CANCEL); > > > data = new FormData (); > data.width = 200; > data.left = new FormAttachment (label, 0, SWT.DEFAULT); > data.right = new FormAttachment (100, 0); > data.top = new FormAttachment (label, 0, SWT.CENTER); > data.bottom = new FormAttachment (cancel, 0, SWT.DEFAULT); > text.setLayoutData (data); > > Button ok = new Button (dialog, SWT.PUSH); > ok.setText ("OK"); > data = new FormData (); > data.width = 60; > data.right = new FormAttachment (cancel, 0, SWT.DEFAULT); > data.bottom = new FormAttachment (100, 0); > ok.setLayoutData (data); > ok.addSelectionListener (widgetSelectedAdapter(event -> { > dialog.close (); > })); > > dialog.setDefaultButton (ok); > dialog.pack (); > text.setFocus(); > dialog.open (); > System.out.println("dialog at "+dialog.getBounds()); > })); > 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 514483
: 267950 |
268198
|
268226