[gui] Align AccessibleAWTButton w/ jdk
Jerry Quinn
jlquinn@optonline.net
Tue Nov 23 02:38:00 GMT 2004
Tom Tromey wrote:
>>>>>>"Jerry" == Jerry Quinn <jlquinn@optonline.net> writes:
>
>
> Jerry> JDK 1.4.2 returns "click" here. No docs, of course.
>
> Could you add a short comment to the code explaining this?
> Otherwise future hackers will need to figure out where this came
> from.
>
> Tom
>
How's this?
2004-11-22 Jerry Quinn <jlquinn@optonline.net>
* java/awt/Button.java
(AccessibleAWTButton.getAccessibleActionDescription): Explain the
source of 'click'.
Index: Button.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Button.java,v
retrieving revision 1.12.2.6
retrieving revision 1.12.2.7
diff -u -r1.12.2.6 -r1.12.2.7
--- Button.java 22 Nov 2004 01:22:21 -0000 1.12.2.6
+++ Button.java 23 Nov 2004 01:26:08 -0000 1.12.2.7
@@ -113,7 +113,10 @@
*/
public String getAccessibleActionDescription(int i)
{
- // JDK 1.4.2 returns this.
+ // JDK 1.4.2 returns the string "click" for action 0. However, the API
+ // docs don't say what the string to be returned is, beyond being a
+ // description of the action. So we return the same thing for
+ // compatibility with 1.4.2.
if (i == 0)
return "click";
return null;
More information about the Java-patches
mailing list