简体   繁体   English

JTextArea实时拼写检查器

[英]JTextArea Real Time Spell Checker

I need a good spell checker library for Java that can spell check a JTextArea (or any JTextComponent) in real time. 我需要一个很好的Java拼写检查程序库,它可以实时拼写检查JTextArea(或任何JTextComponent)。 That is, it should have a wavy red underline appear under text while the user is typing. 也就是说,当用户键入时,它应该在文本下面出现波浪形的红色下划线。

It needs to be able to list all the available word replacements by left clicking (yes, left clicking) the word. 它需要能够通过左键单击(是,左键单击)单词列出所有可用的单词替换。 If not possible, right-click is fine. 如果不可能,右键单击就可以了。

It needs to have an "Ignore All," but not an Add, Ignore, or any of the others. 它需要一个“忽略所有”,但不是一个Add,Ignore或任何其他的。 Just Ignore All. 只是忽略一切。

Ideally, you should be able to change how the dropdown box looks, at least to some extent. 理想情况下,您应该能够更改下拉框的外观,至少在某种程度上如此。

No user-spell checker is needed. 不需要用户拼写检查程序。 That is, I don't need a button that when you click it brings up a spell check dialog, I only need real time checking. 也就是说,我不需要一个按钮,当你点击它时会弹出一个拼写检查对话框,我需要实时检查。 I actually already have a spell checking dialog library. 我实际上已经有一个拼写检查对话框库。

If someone can suggest a good library (I am willing to pay for it) or, better yet, explain a good method for doing this to a textarea in the first place that would be fantastic. 如果有人可以建议一个好的图书馆(我愿意付钱),或者更好的是,首先要解释一个很好的方法,这对于一个textarea来说是非常棒的。

At the very least if someone could explain how to check the JTextArea against my dictionary and put the red underline and the dropdown on clicking or any of these steps that would be a great start. 至少如果有人可以解释如何根据我的字典检查JTextArea并将红色下划线和下拉列表点击或任何这些步骤,这将是一个很好的开始。

Thanks for the potential help. 感谢您的潜在帮助。

Trying to make a complete list. 试图制作完整的清单。 Feel free to add. 随意添加。

Full-blown solutions 全面的解决方案

Libraries 图书馆

决定和Wintertree一起去

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM