Eclipse Rich Ajax Platform

org.eclipse.swt.accessibility
Class AccessibleActionAdapter

java.lang.Object
  extended by org.eclipse.swt.accessibility.AccessibleActionAdapter
All Implemented Interfaces:
AccessibleActionListener

public class AccessibleActionAdapter
extends java.lang.Object
implements AccessibleActionListener

This adapter class provides default implementations for the methods in the AccessibleActionListener interface.

Classes that wish to deal with AccessibleAction events can extend this class and override only the methods that they are interested in.

Since:
1.4
See Also:
AccessibleActionListener, AccessibleActionEvent

Constructor Summary
AccessibleActionAdapter()
           
 
Method Summary
 void doAction(AccessibleActionEvent e)
          Performs the specified action on the object.
 void getActionCount(AccessibleActionEvent e)
          Returns the number of accessible actions available in this object.
 void getDescription(AccessibleActionEvent e)
          Returns a description of the specified action.
 void getKeyBinding(AccessibleActionEvent e)
          Returns a string representing one or more key bindings, if there are any, associated with the specified action.
 void getName(AccessibleActionEvent e)
          Returns the name of the specified action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessibleActionAdapter

public AccessibleActionAdapter()
Method Detail

getActionCount

public void getActionCount(AccessibleActionEvent e)
Returns the number of accessible actions available in this object.

If there are more than one, the first one (index 0) is considered the "default" action of the object.

Specified by:
getActionCount in interface AccessibleActionListener
Parameters:
e - an event object containing the following fields:
  • [out] count - the number of actions, or zero if there are no actions

doAction

public void doAction(AccessibleActionEvent e)
Performs the specified action on the object.

Specified by:
doAction in interface AccessibleActionListener
Parameters:
e - an event object containing the following fields:
  • [in] index - a 0 based index specifying the action to perform. If the index lies outside the valid range no action is performed.
  • [out] result - set to ACC.OK if the action was performed.

getDescription

public void getDescription(AccessibleActionEvent e)
Returns a description of the specified action.

Specified by:
getDescription in interface AccessibleActionListener
Parameters:
e - an event object containing the following fields:
  • [in] index - a 0 based index specifying which action's description to return
  • [out] result - a localized string describing the specified action, or null if the index lies outside the valid range

getKeyBinding

public void getKeyBinding(AccessibleActionEvent e)
Returns a string representing one or more key bindings, if there are any, associated with the specified action.

The returned string is of the following form: mnemonic;accelerator for example: "C;CTRL+C" for the Copy item in a typical Edit menu.

Specified by:
getKeyBinding in interface AccessibleActionListener
Parameters:
e - an event object containing the following fields:
  • [in] index - a 0 based index specifying which action's key bindings to return
  • [out] result - a semicolon-delimited string of localized key bindings (example: "C;CTRL+C"), or null if the index lies outside the valid range

getName

public void getName(AccessibleActionEvent e)
Returns the name of the specified action.

There is no need to implement this method for single action controls since that would be redundant with AccessibleControlListener.getDefaultAction.

Specified by:
getName in interface AccessibleActionListener
Parameters:
e - an event object containing the following fields:
  • [in] index - a 0 based index specifying which action's name to return
  • [in] localized - a boolean indicating whether or not to return a localized name
  • [out] result - the name of the specified action, or null if the index lies outside the valid range

Eclipse Rich Ajax Platform

Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.