org.eclipse.swt.events.TypedEvent Java Examples
The following examples show how to use
org.eclipse.swt.events.TypedEvent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractExampleTab.java From nebula with Eclipse Public License 2.0 | 5 votes |
private void createListeners(Composite parent) { parent.setLayout(new GridLayout(4, false)); ButtonFactory.create(parent, SWT.PUSH, "Select Listeners", event -> { ListenersDialog dialog = new ListenersDialog(Display.getCurrent().getActiveShell()); if (dialog.open(selectedEvents) == Window.OK) { updateListeners(); } }); listen = ButtonFactory.create(parent, SWT.CHECK, "Listen", event -> updateListeners()); Label spacer = new Label(parent, SWT.NONE); spacer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Button clear = new Button(parent, SWT.PUSH); clear.setText("Clear"); final Text eventText = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 120; gd.horizontalSpan = 4; eventText.setLayoutData(gd); clear.addListener(SWT.Selection, event -> eventText.setText("")); listenerThatPrints = event -> { TypedEvent typedEvent = getTypedEvent(event); eventText.append("\n" + typedEvent.toString()); }; }
Example #2
Source File: WebKitBrowser.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
void notifyListeners(final TypedEvent event) { if (isDisposed()) { return; } getDisplay().asyncExec(new Runnable() { public void run() { callListeners(event); } }); }