@Override public void handleEvent(Event e) { if (e.character == '\r') { handleActivate(e); } } });
private void handleMouseUp(Event e) { if (!armed || e.button != 1) return; Point size = getSize(); // Filter out mouse up events outside // the link. This can happen when mouse is // clicked, dragged outside the link, then // released. if (e.x < 0) return; if (e.y < 0) return; if (e.x >= size.x) return; if (e.y >= size.y) return; handleActivate(e); }
private void handleMouseUp(Event e) { if (!armed || e.button != 1) return; Point size = getSize(); // Filter out mouse up events outside // the link. This can happen when mouse is // clicked, dragged outside the link, then // released. if (e.x < 0) return; if (e.y < 0) return; if (e.x >= size.x) return; if (e.y >= size.y) return; handleActivate(e); }
break; case SWT.DefaultSelection: handleActivate(e); break; case SWT.MouseEnter:
addListener(SWT.KeyDown, e -> { if (e.character == '\r') { handleActivate(e); break; case SWT.DefaultSelection: handleActivate(e); break; case SWT.MouseEnter: