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