JavaFX:鼠标剪贴板在Unix中不起作用 [英] JavaFX: Mouse clipboard does not work in Unix

查看:58
本文介绍了JavaFX:鼠标剪贴板在Unix中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能已经知道,在Unix中,通常使用鼠标进行复制粘贴操作。即文本选择会自动将其复制到剪贴板,然后单击滚动将其粘贴到您单击的位置。



我知道



但是在带有Java 8的JavaFX(更新45)中,鼠标剪贴板不起作用,因此:




  • 我无法通过单击滚动键将任何文本粘贴到GUI

  • 我无法复制任何文本通过从GUI中选择它就可以了。



我在 TextInputDialog 中遇到了这个问题,使用 TextArea 。到目前为止,我还没有尝试过其他小部件。



您能告诉我如何启用鼠标剪贴板吗?



屏幕截图





解决方案

目前尚无支持的方法

此处列出了错误/功能请求

[OpenJDK错误报告: https://bugs.openjdk.java.net/browse/JDK-8088117]

现在它反向链接到该SO条目。



@ user4231709抱歉,您的解决方案无法解决问题,因为它使用了系统剪贴板这是不同的。
要进一步阅读,请查找 sun.awt.X11.XSelection。



还有另一个 SO 关于此主题的条目。


In Unix, as you probably know, it is common to use the mouse for copy-paste operations. I.e. text selection automatically copies it to the clipboard and clicking on the scroll pastes it where you click.

I do not have clipboard problems with GUI applications that use Java 7 with Swing.

But in JavaFX with Java 8 (update 45), the mouse clipboard does not work, so that:

  • I cannot paste any text to the GUI by clicking the scroll
  • I cannot copy any text from the GUI by just selecting it

I encountered this problem with TextInputDialog and with TextArea. I haven't tried other widgets so far.

Can you please tell how to enable the mouse clipboard?

Screenshots:

解决方案

In the moment there is no supported way to do this with JDK.
The bug/feature request is listed here
[OpenJDK bug report: https://bugs.openjdk.java.net/browse/JDK-8088117]
It backlinks now to this SO entry.

@user4231709 Sorry, your solution doesn't help with the problem because this uses the system clipboard which is different. For further reading look for "sun.awt.X11.XSelection".

There is also another SO entry about this topic.

这篇关于JavaFX:鼠标剪贴板在Unix中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆