开发者

Using libraries/apps with different UI event listeners

开发者 https://www.devze.com 2023-03-15 14:41 出处:网络
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

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.

An开发者_运维知识库y ideas on how to identify and/or ignore applets compiled to use the older UI events?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消