2 Replies Latest reply: Jan 31, 2008 8:41 AM by 843807 RSS

    HOWTO Get the text of "combo box" and "labe" controls with JavaAccessBridge

    843807
      HOWTO Get the text of "combo box" and "labe" controls with JavaAccessBridge.

      Please help,

      I'm trying to use the Java Access Bridge (JAB) 2.1 to get the text in Java Applet controls. I've been able to use the sample code in AccessInfo.cpp sample that comes with JAB to get text from "text" controls in a Java Applet. To clarify, I am referring to the "role" in the AccessibleContextInfo struct being set to "text" or "combo box" or "label".

      The problem is, when I use the AccessInfo.cpp sample to get text from a "combo box", the accessibleText data member comes back as FALSE, and thus any of the JAB text functions like GetAccessibleTextInfo fail to get any text information from "combo box" or "label" controls.

      I've also tried GetCurrentAccessibleValueFromContext on the "combo box" and "label" controls, but the text returned is empty.

      Can anyone help?
        • 1. Re: HOWTO Get the text of "combo box" and "labe" controls with JavaAccessBridge
          843807
          I've been trying more with JAB to get text from combo boxes, labels, and push buttons. The AccessibleContextInfo for a control of those types, typically comes back as only having accessibleAction and accessibleComponent as TRUE. Note, the accessibleInterfaces = 6, which implies accessibleAction and accessibleComponent. Note also, the various get context value functrions like GetCurrentAccessibleValueFromContext depend on the accessibleInterfaces having a 1 XOR'd with it.

          At any rate, attempts to get actions using getAccessibleActions returns a AccessibleActions object whose actionsCount is zero.

          Nothing inside the Ferret example, or documentation leads any light to this issue. The only way to progress is is someone point blanks gives a solution.

          Any help, would be much aprpreciated.
          • 2. Re: HOWTO Get the text of "combo box" and "labe" controls with JavaAccessBridge
            843807
            I have new information in regards to this issue. A contact from Sun did get to me in email and relayed that that "label" objects store their text in the "name" data member of the AccessibleContext structure. This was a big help.

            But I'm still stuck trying to get information from "combo box" and other controls, like "push button". The contact said, the Java Access Bridge does not provide all the information because it is already implemented by other interfaces like AccessibleComponent, AccessibleAction, or AccessibleSelection. The contact did not allude to whether these opther interfaces can be used along side the Java Access Bridge or not. So, I'm left a step closer to the goal, but still stuck without the full solution.

            Can one take the Java Access Bridge functions, like say those used in the Ferret sample, and close the gap to get text back from "combo box", "push button", and other controls by using some other API in conjunction?