1. /*
  2. * @(#)AccessibleAction.java 1.14 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.accessibility;
  8. /**
  9. * The AccessibleAction interface should be supported by any object
  10. * that can perform one or more actions. This interface
  11. * provides the standard mechanism for an assistive technology to determine
  12. * what those actions are as well as tell the object to perform them.
  13. * Any object that can be manipulated should support this
  14. * interface. Applications can determine if an object supports the
  15. * AccessibleAction interface by first obtaining its AccessibleContext (see
  16. * {@link Accessible}) and then calling the {@link AccessibleContext#getAccessibleAction}
  17. * method. If the return value is not null, the object supports this interface.
  18. *
  19. * @see Accessible
  20. * @see Accessible#getAccessibleContext
  21. * @see AccessibleContext
  22. * @see AccessibleContext#getAccessibleAction
  23. *
  24. * @version 1.3 02/04/98 11:12:57
  25. * @author Peter Korn
  26. * @author Hans Muller
  27. * @author Willie Walker
  28. */
  29. public interface AccessibleAction {
  30. /**
  31. * Returns the number of accessible actions available in this object
  32. * If there are more than one, the first one is considered the "default"
  33. * action of the object.
  34. *
  35. * @return the zero-based number of Actions in this object
  36. */
  37. public int getAccessibleActionCount();
  38. /**
  39. * Returns a description of the specified action of the object.
  40. *
  41. * @param i zero-based index of the actions
  42. * @return a String description of the action
  43. * @see #getAccessibleActionCount
  44. */
  45. public String getAccessibleActionDescription(int i);
  46. /**
  47. * Performs the specified Action on the object
  48. *
  49. * @param i zero-based index of actions
  50. * @return true if the action was performed; otherwise false.
  51. * @see #getAccessibleActionCount
  52. */
  53. public boolean doAccessibleAction(int i);
  54. }