4
A
回答
2
您可以使用CodeArea突出顯示錯誤。
CodeArea codeArea = new CodeArea();
codeArea.textProperty().addListener((observable, oldText, newText) -> {
List<IndexRange> errors = spellCheck(newText);
for(IndexRange error: errors) {
codeArea.setStyleClass(error.getStart(), error.getEnd(), "spell-error");
}
});
List<IndexRange> spellCheck(String text) {
// Implement your spell-checking here.
}
此外,設置錯誤樣式在樣式表
.spell-error {
-fx-effect: dropshadow(gaussian, red, 2, 0, 0, 0);
}
請注意,您需要JDK8使用CodeArea。
相關問題
- 1. 在Sencha Textarea中拼寫檢查
- 2. jquery textarea編輯器與拼寫檢查
- 3. Textarea拼寫檢查屬性XHTML嚴格
- 4. 在PHP中拼寫檢查
- 5. Windows Phone 7拼寫檢查文本框
- 6. 拼寫檢查
- 7. 德文的拼寫檢查
- 8. 拼寫檢查的文獻?
- 9. HTML textarea的拼寫檢查:如何判斷用戶進行拼寫錯誤
- 10. javascript拼寫檢查
- 11. Solr拼寫檢查
- 12. WPF拼寫檢查
- 13. hunspell拼寫檢查
- 14. Solr拼寫檢查
- 15. 拼寫檢查textfield
- 16. Iphone拼寫檢查
- 17. UISearchBar拼寫檢查
- 18. GWT拼寫檢查
- 19. 拼寫檢查器
- 20. 更改IPAD上textarea中使用的拼寫檢查語言
- 21. 在WebKit的textarea上強制進行拼寫檢查
- 22. c中的拼寫檢查#
- 23. 如何在WP7文本框中啓用拼寫檢查程序
- 24. 在幫助文本中自動禁用拼寫檢查
- 25. 拼寫檢查如何在vb.net中輸入TextBox的文本?
- 26. 拼寫檢查在emacs文本編輯器中不起作用
- 27. Dojo文本框拼寫檢查工作不在IE中
- 28. Lucene全文查詢拼寫檢查
- 29. 如何在eclipse c/C++版本中檢查純文本文件中的拼寫?
- 30. 的Python 3:基本拼寫檢查
[JavaFX TextArea中突出顯示字符串]的可能重複(http://stackoverflow.com/questions/9128535/highlighting-strings-in-javafx-textarea) – jewelsea