On Fri, 23 Dec 2022 09:15:47 GMT, Artem Semenov <[email protected]> wrote:
>> src/java.desktop/share/classes/sun/swing/AccessibleComponentAccessor.java
>> line 42:
>>
>>> 40: }
>>> 41:
>>> 42: public static Accessible getAccessible(AccessibleContext context) {
>>
>> Will the fix have more code if it will be implemented via SwingAccessor just
>> to access that "private" method?
>
> Thank you.
> I removed adding accesses for TableCell and ListChildren. If that's what you
> meant.
> I would like to keep the implementation of the Accesser itself, if possible.
> Because in the future it may come in handy in this form, if in the future you
> still need to add access to the currentComponent for ListChildren and
> TableCell.
> this approach allows us to make the implementation more generic, in case the
> potential tree is not inherited from Jtree. It also avoids reflection.
Probably we can simplify it further. usually, the SwingAccessor is used to
store one accessor per class, which does not need to have an additional list of
functions. And if the a11y code needs to call different methods for different
types of AccessibleComponent then it uses "instanceof" or role check inside the
a11y code. Can we do the same here? It will have the same functionality.
-------------
PR: https://git.openjdk.org/jdk/pull/11670