1 |
/* AccessibleAction.java -- Java interface for aiding in accessibly determining |
/* AccessibleAction.java -- aids in accessibly performing actions |
2 |
what actions an object can perform |
Copyright (C) 2000, 2002 Free Software Foundation, Inc. |
|
Copyright (C) 2000 Free Software Foundation, Inc. |
|
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
7 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
8 |
the Free Software Foundation; either version 2, or (at your option) |
the Free Software Foundation; either version 2, or (at your option) |
9 |
any later version. |
any later version. |
10 |
|
|
11 |
GNU Classpath is distributed in the hope that it will be useful, but |
GNU Classpath is distributed in the hope that it will be useful, but |
12 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
35 |
obligated to do so. If you do not wish to do so, delete this |
obligated to do so. If you do not wish to do so, delete this |
36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
38 |
|
|
39 |
package javax.accessibility; |
package javax.accessibility; |
40 |
|
|
41 |
/** |
/** |
42 |
* If an object implements this interface then it must be able to |
* If an object implements this interface then it must be able to perform one |
43 |
* perform one or more actions. By implementing the interface it |
* or more actions. Accessibility software can use the implementations of this |
44 |
* is possible to discover what those actions are and perform those |
* interface to discover and perform actions on an object. |
45 |
* actions. |
* |
46 |
* <p> |
* <p>The <code>AccessibleContext.getAccessibleAction()</code> method should |
47 |
* The <code>AccessibleContext.getAccessibleAction()</code> method |
* return <code>null</code> if an object does not implement this interface. |
48 |
* should return <code>null</code> if an object does not implement |
* |
49 |
* this interface. |
* @author Eric Blake <ebb9@email.byu.edu> |
50 |
* |
* @see Accessible |
51 |
|
* @see AccessibleContext |
52 |
* @see AccessibleContext#getAccessibleAction() |
* @see AccessibleContext#getAccessibleAction() |
53 |
|
* @since 1.2 |
54 |
|
* @status updated to 1.4 |
55 |
*/ |
*/ |
56 |
public interface AccessibleAction { |
public interface AccessibleAction |
57 |
|
{ |
58 |
/** |
/** |
59 |
* Perform the specified action. |
* Get the number possible actions for this object, with the zeroth |
60 |
* |
* representing the default action. |
61 |
* @param i the action to perform. Actions are counted starting with zero. |
* |
62 |
* @return false if the action was not performed and true if was performed |
* @return the 0-based number of actions |
63 |
*/ |
*/ |
64 |
public abstract boolean doAccessibleAction(int i); |
int getAccessibleActionCount(); |
65 |
|
|
66 |
/** |
/** |
67 |
* Get the number possible actions for this object with the first |
* Get a description for the specified action. Returns null if out of |
68 |
* representing the default action. |
* bounds. |
69 |
*/ |
* |
70 |
public abstract int getAccessibleActionCount(); |
* @param i the action to describe, 0-based |
71 |
|
* @return description of the action |
72 |
/** |
*/ |
73 |
* Get a description for the specified action. |
String getAccessibleActionDescription(int i); |
74 |
* |
|
75 |
* @param i the action to describe. Actions are counted starting with zero. |
/** |
76 |
* @return description of the action |
* Perform the specified action. Does nothing if out of bounds. |
77 |
*/ |
* |
78 |
public abstract String getAccessibleActionDescription(int i); |
* @param i the action to perform, 0-based |
79 |
} |
* @return true if the action was performed |
80 |
|
*/ |
81 |
|
boolean doAccessibleAction(int i); |
82 |
|
} // interface AccessibleAction |