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 192010 Details for
Bug 341117
ToolItem traversal does not fire deactivate event.
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.
ToolItem no deactivate event
tooltemDeactivate.txt (text/plain), 1.42 KB, created by
Stuart Barker
on 2011-03-28 11:14:43 EDT
(
hide
)
Description:
ToolItem no deactivate event
Filename:
MIME Type:
Creator:
Stuart Barker
Created:
2011-03-28 11:14:43 EDT
Size:
1.42 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >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.Text; >import org.eclipse.swt.widgets.ToolBar; >import org.eclipse.swt.widgets.ToolItem; > > > >public class Main { > > public static void main(final String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > GridLayout gridLayout = new GridLayout(); > gridLayout.numColumns = 1; > shell.setLayout(gridLayout); > shell.setSize(100, 140); > ToolBar toolBar = new ToolBar(shell, SWT.HORIZONTAL | SWT.FLAT); > ToolItem button = new ToolItem(toolBar, SWT.PUSH); > button.setText("A button"); > addText("Text 1", shell); > addText("Text 2", shell); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > display.dispose(); > } > > private static void addText(final String textString, final Shell shell) { > Text text = new Text(shell, SWT.NONE); > text.setText(textString); > text.addListener(SWT.Deactivate, new Listener() { > public void handleEvent(final Event event) { > System.out.println(textString + " deactivated"); > } > }); > text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); > } > >} >
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 341117
: 192010