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:
JDE 4.7.0

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

Method Detail

getAccessible

public 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:
JDE 4.7.0



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.