使用具有不同 UI 事件侦听器的库/应用程序

发布于 2024-11-17 10:24:57 字数 475 浏览 3 评论 0原文

基于 Java 1.3+ JRE 进行一些辅助功能工作。

最近遇到一个问题,一些 Java 1.0/1.1 小程序由较新的 JRE 加载,当 1.3 可访问性 API 注册某些事件侦听器时,它会破坏小程序中的所有旧样式事件,因此 UI 失败。

添加 TopLevelWindowListener 不会导致任何问题,但是在某些情况下我们还希望添加

SwingEventMonitor.addInternalFrameListener(new InternalFrameListener(){...});
parent.addContainerListener(new ContainerAdapter(){...});

这些小程序,如果我们的可访问性失败也不会出现问题,问题是小程序无法工作,因为注册新事件类型停止调用旧类型。

关于如何识别和/或忽略编译为使用旧 UI 事件的小程序有什么想法吗?

Doing some accessibility work based on Java 1.3+ JREs.

Recently had an issue that some Java 1.0/1.1 applets being loaded by the newer JRE, and when the 1.3 accessibility API registered certain event listeners it breaks all of the older style events in the applet so the UI fails.

Adding a TopLevelWindowListener doesn't cause any issue, however we also want in some cases to add

SwingEventMonitor.addInternalFrameListener(new InternalFrameListener(){...});
parent.addContainerListener(new ContainerAdapter(){...});

There would be no problem if our accessibility failed with these applets, the problem is that the applets fail to work because registering the new event type stops calls to the old type.

Any ideas on how to identify and/or ignore applets compiled to use the older UI events?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝戈者 2024-11-24 10:24:57

您可能需要做的是检查 http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Container.html#getListeners%28java.lang.Class%29并在添加新的辅助功能侦听器之前查看您需要的任何事件类型是否已注册侦听器。

What you would probably have to do is check http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Container.html#getListeners%28java.lang.Class%29 and see if any of the event types you need have listeners registered prior to adding your new accessibility listeners.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文