swt-awt

MouseWheel event doesn't fire in SWT-AWT component

◇◆丶佛笑我妖孽 提交于 2020-01-04 13:06:56
问题 I am stuck at mousewheel event that just doesn't fire. I use swt_awt bridge, so I am able to use swing component in my RCP application. I tested everything I was able to find, but with no success. Because my application is awfully complex, I created a simplified version of my problem, which should also help you to orientate if you would like to help me. Now this simplified problem is, that I want my textarea (or scrollpane) to catch mousewheel events. But these events are lost. import java

MouseWheel event doesn't fire in SWT-AWT component

徘徊边缘 提交于 2020-01-04 13:06:41
问题 I am stuck at mousewheel event that just doesn't fire. I use swt_awt bridge, so I am able to use swing component in my RCP application. I tested everything I was able to find, but with no success. Because my application is awfully complex, I created a simplified version of my problem, which should also help you to orientate if you would like to help me. Now this simplified problem is, that I want my textarea (or scrollpane) to catch mousewheel events. But these events are lost. import java

Making composite focusable in SWT

眉间皱痕 提交于 2019-12-22 02:32:07
问题 Is it possible to create a focusable composite in SWT? I'm catching all keyboard events via Display filter, but there are some problems when the focus is on the tree or list - GTK+'s default action is to search in the contents of the control. What I want to do is to mix SWT and AWT with focusable AWT component. I managed to make the AWT widget unfocusable and I added Display filter to make the AWT component receiving keyboard events (but not directly), even when it's not focused. But there

Showing SWT modal dialog from AWT/Swing

爷,独闯天下 提交于 2019-12-11 10:51:44
问题 Using Albireo, it's easy to see how to show a Swing dialog from SWT: private AwtEnvironment awtEnv = AwtEnvironment.getInstance(Display.getCurrent); ... // call from SWT thread void showSwingMessageDialog(String msg) { awtEnv.invokeAndBlockSwt(new Runnable() { public void run() { Frame parentFrame = awtEnv.createDialogParentFrame(); JOptionPane.showMessageDialog(parentFrame, msg); } } } I want to show an SWT dialog from AWT thread, i.e. // call from AWT thread void showSWTMessageDialog(String