Help Center

Local Navigation

Provide an assistive technology application with access to numeric values

You can provide accessibility information about the custom UI controls, such as progress indicators, that display numeric values.

  1. Import the required interfaces.
    import net.rim.device.api.ui.accessibility.AccessibleContext;
    import net.rim.device.api.ui.accessibility.AccessibleValue;
    
    AccessibleContext provides basic accessibility information about a custom UI control. AccessibleValue provides information about the numeric values in a custom UI control that displays numeric values.
  2. Create a class that implements the AccessibleContext interface and the AccessibleValue interface.
    public class GaugeFieldAccessibleValue extends Field
      implements AccessibleContext, AccessibleValue 
    {
    }
    
  3. Create variables to store the custom UI control's accessibility state and the contents.
    private int _state;
    private int _min;
    private int _current;    
    private int _max;
    
  4. Implement the AccessibleValue.get() methods to provide the accessibility information about the numeric values.
    public int getCurrentAccessibleValue() 
    {
      return _current;
    }
    
    public int getMaxAccessibleValue() 
    {
      return _max;
    }
    
    public int getMinAccessibleValue() 
    {
      return _min;
    }        
    

Index


Was this information helpful? Send us your comments.