net.rim.device.api.ui.accessibility
Interface AccessibleListFieldCallback


public interface AccessibleListFieldCallback

Adds accessibility to list field callback. Classes implement this interface to provide accessible functionality to the list elements.

This interface should be implemented only if the accessible objects are different from list objects. Here is an example of a list field with string elements.

 
 public class MyListCallback implements ListFieldCallback, AccessibleListFieldCallback
 {
     // return list element
     public Object get( ListField listField, int index )
     {
         String listRow = getElement( index );
         return listRow;
     }

     // return accessible wrapped element
     public AccessibleContext getAccessible( Field listField, int index )
     {
         String listRow = getElement( index );
         AccessibleContext accessible = new MyAccessibleLabelWrapper( listRow );
         return accessible;
     }
 }
 
 

ListField's getAccessibleChildAt() method checks whether the callback implements AccessibleListFieldCallback interface and if so calls it. Otherwise, elements provided by ListFieldCallback.get(net.rim.device.api.ui.component.ListField, int) are used.

Since:
BlackBerry API 4.6.1

Method Summary
 AccessibleContext getAccessible(Field listField, int index)
          Returns accessible element at specified list row.
 



Method Detail

getAccessible

AccessibleContext getAccessible(Field listField,
                                int index)
Returns accessible element at specified list row.

Parameters:
listField - accessible list field that displays the list
index - index of the element
Returns:
accessible element at specified row
Since:
BlackBerry API 4.6.1





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal