Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4256657

AccessibleAWTList.getAccessibleSelection(int) always returns null.

    XMLWordPrintable

Details

    • b28
    • generic, sparc
    • generic, solaris_2.5.1
    • Verified

    Description



      Name: aaC67449 Date: 07/23/99



      the List.AccessibleAWTList.getAccessibleSelection(int) method always returns
      null, but should return "an Accessible containing the selected item"

      javadoc says:"
      public Accessible getAccessibleSelection(int i)

            Returns an Accessible representing the specified selected item in the object. If there
            isn't a selection, or there are fewer items selected than the integer passed in, the
            return value will be null.
            Specified by:
                  getAccessibleSelection in interface AccessibleSelection
            Parameters:
                  i - the zero-based index of selected items
            Returns:
                  an Accessible containing the selected item
      "

      See example.
      ------------- example --------------
      import java.awt.List;
      import javax.accessibility.AccessibleSelection;

      public class Test {
          public static void main(String argv[]) {
              List o = new List(10);
              AccessibleSelection c =
                      o.getAccessibleContext().getAccessibleSelection();

              for (int i = 0; i < 10; i++) {
                  o.add("Test" + i);
              }

              o.select(4);

              System.out.println("getAccessibleSelection:"
                      + c.getAccessibleSelection(0));
       
          }

      }
      ------------- JDK1.3L output ---------------
      Warning: JIT compiler "sunwjit" not found. Will use interpreter.
      null

      ======================================================================

      Attachments

        Activity

          People

            prssunw Prs Prs (Inactive)
            alisunw Ali Ali (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: