使用具有不同 UI 事件侦听器的库/应用程序
基于 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要做的是检查 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.