Java Swing JEditorPane和屏幕阅读器 [英] Java Swing JEditorPane and Screen Readers

查看:207
本文介绍了Java Swing JEditorPane和屏幕阅读器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找最近几天,在任何地方都找不到答案。我正在尝试在Java Swing中创建可访问的IDE。我唯一遇到的问题是模拟其他文本文本编辑器中发生的行为。

I've been looking for the last few days and can't find an answer anywhere. I'm trying to make an accessible IDE in Java Swing. The only thing I'm having problems with, is emulating behavior that happens in other text text editors.

我希望屏幕阅读器(特别是JAWS)读取文本区域所选行中的所有内容(不像突出显示的那样,无论光标位于何处-那全线)。

I want the screen reader (JAWS, in particular) to read whatever is in the selected line of the text area (not like highlighted, just wherever the cursor is - that whole line).

如果我在Eclipse甚至记事本中尝试此操作,每当我使用箭头键移动文本光标时,屏幕阅读器都会立即读取该行上的内容。它在我的程序中没有做到 ,我什至尝试使用JEditorPane简化为简单的JFrame(也尝试了简单的JTextArea)。

If I try this in Eclipse, or even notepad, whenever I use the arrow keys to move the text cursor, the screen reader immediately reads whatever is on that line. It does not do this in my program, which I've even tried to simplify down to a simple JFrame with a JEditorPane(tried a simple JTextArea as well).

是否有特定的侦听器,或者我必须实现可访问性的东西,或者idk还有什么,才能创建此功能?如果我的问题令人困惑,我深表歉意。我仍在尝试学习如何使辅助功能真正发挥作用。
如果还有其他需要澄清的地方,请告诉我。

Is there a particular listener, or something I have to implement accessibility-wise, or idk what else, in order to create this functionality? I apologize if my question is confusing. I'm still trying to learn how to actually make the accessibility stuff work. If there's anything else I can clarify please let me know.

推荐答案

您是否研究过使用Java Access桥(下载并安装),因为对于JAWS之类的屏幕阅读器来说,读取Java应用程序是必需的。 Java访问桥信息可以在这里找到。 http://www.oracle.com/technetwork/java /javase/tech/index-jsp-136191.html

Have you looked into using the Java Access bridge (download and install it), as this is necessary for screen readers like JAWS to read java applications. Java access bridge info can be found here. http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136191.html

这篇关于Java Swing JEditorPane和屏幕阅读器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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