[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: accesibility fixes

Kaffe CVS cvs-commits at kaffe.org
Wed Jan 5 16:47:42 PST 2005


PatchSet 5782 
Date: 2005/01/06 00:22:45
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: accesibility fixes

Members: 
	ChangeLog:1.3326->1.3327 
	libraries/javalib/java/awt/Button.java:1.8->1.9 
	libraries/javalib/java/awt/Canvas.java:1.16->1.17 
	libraries/javalib/java/awt/Checkbox.java:1.3->1.4 
	libraries/javalib/java/awt/CheckboxMenuItem.java:1.14->1.15 
	libraries/javalib/java/awt/Choice.java:1.5->1.6 
	libraries/javalib/java/awt/Dialog.java:1.12->1.13 
	libraries/javalib/java/awt/Frame.java:1.22->1.23 
	libraries/javalib/java/awt/Label.java:1.6->1.7 
	libraries/javalib/java/awt/List.java:1.5->1.6 
	libraries/javalib/java/awt/Menu.java:1.13->1.14 
	libraries/javalib/java/awt/MenuBar.java:1.10->1.11 
	libraries/javalib/java/awt/MenuItem.java:1.17->1.18 
	libraries/javalib/java/awt/PopupMenu.java:1.11->1.12 
	libraries/javalib/java/awt/ScrollPane.java:1.18->1.19 
	libraries/javalib/java/awt/Scrollbar.java:1.7->1.8 
	libraries/javalib/java/awt/TextArea.java:1.6->1.7 
	libraries/javalib/java/awt/TextComponent.java:1.4->1.5 
	libraries/javalib/java/awt/Window.java:1.27->1.28 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3326 kaffe/ChangeLog:1.3327
--- kaffe/ChangeLog:1.3326	Thu Jan  6 00:20:15 2005
+++ kaffe/ChangeLog	Thu Jan  6 00:22:45 2005
@@ -2,6 +2,39 @@
 
 	Resynced with GNU Classpath.
 
+	2004-12-29  Jerry Quinn  <jlquinn at optonline.net>
+
+	* java/awt/Button.java,
+	java/awt/Canvas.java,
+	java/awt/Checkbox.java,
+	java/awt/CheckboxMenuItem.java,
+	java/awt/Choice.java,
+	java/awt/Dialog.java,
+	java/awt/Frame.java,
+	java/awt/Label.java,
+	java/awt/List.java,
+	java/awt/Menu.java,
+	java/awt/MenuBar.java,
+	java/awt/MenuItem.java,
+	java/awt/PopupMenu.java,
+	java/awt/ScrollPane.java,
+	java/awt/Scrollbar.java,
+	java/awt/TextArea.java,
+	java/awt/Window.java (getAccessibleContext): Clean up comments.
+	Reformat.
+	* java/awt/Button.java,
+	java/awt/Checkbox.java,
+	java/awt/Choice.java,
+	java/awt/Menu.java,
+	java/awt/PopupMenu.java,
+	java/awt/TextArea.java (getAccessibleContext): Only create new
+	accessible once.
+	* java/awt/TextComponent.java (getAccessibleContext): Implement.
+
+2005-01-06  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
 	2004-12-30  Michael Koch  <konqueror at gmx.de>
 
 	* javax/imageio/metadata/IIOInvalidTreeException.java
Index: kaffe/libraries/javalib/java/awt/Button.java
diff -u kaffe/libraries/javalib/java/awt/Button.java:1.8 kaffe/libraries/javalib/java/awt/Button.java:1.9
--- kaffe/libraries/javalib/java/awt/Button.java:1.8	Wed Jan  5 20:06:43 2005
+++ kaffe/libraries/javalib/java/awt/Button.java	Thu Jan  6 00:22:46 2005
@@ -428,9 +428,18 @@
     + getWidth () + "x" + getHeight () + ",label=" + getLabel ();
 }
 
+/**
+ * Gets the AccessibleContext associated with this <code>Button</code>.
+ * The context is created, if necessary.
+ *
+ * @return the associated context
+ */
 public AccessibleContext getAccessibleContext()
 {
-  return new AccessibleAWTButton();
+  /* Create the context if this is the first request */
+  if (accessibleContext == null)
+    accessibleContext = new AccessibleAWTButton();
+  return accessibleContext;
 }
 
   /**
Index: kaffe/libraries/javalib/java/awt/Canvas.java
diff -u kaffe/libraries/javalib/java/awt/Canvas.java:1.16 kaffe/libraries/javalib/java/awt/Canvas.java:1.17
--- kaffe/libraries/javalib/java/awt/Canvas.java:1.16	Wed Nov 24 21:49:17 2004
+++ kaffe/libraries/javalib/java/awt/Canvas.java	Thu Jan  6 00:22:46 2005
@@ -174,10 +174,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTCanvas();
-      }
+      accessibleContext = new AccessibleAWTCanvas();
     return accessibleContext;
   }
 
Index: kaffe/libraries/javalib/java/awt/Checkbox.java
diff -u kaffe/libraries/javalib/java/awt/Checkbox.java:1.3 kaffe/libraries/javalib/java/awt/Checkbox.java:1.4
--- kaffe/libraries/javalib/java/awt/Checkbox.java:1.3	Fri Dec  3 01:56:21 2004
+++ kaffe/libraries/javalib/java/awt/Checkbox.java	Thu Jan  6 00:22:46 2005
@@ -490,11 +490,22 @@
 	  + "," + super.paramString());
 }
 
+/**
+ * Gets the AccessibleContext associated with this <code>CheckBox</code>.
+ * The context is created, if necessary.
+ *
+ * @return the associated context
+ */
 public AccessibleContext getAccessibleContext()
 {
-  AccessibleAWTCheckBox ac = new AccessibleAWTCheckBox();
-  addItemListener(ac);
-  return ac;
+  /* Create the context if this is the first request */
+  if (accessibleContext == null)
+  {
+    AccessibleAWTCheckBox ac = new AccessibleAWTCheckBox();
+    accessibleContext = ac;
+    addItemListener(ac);
+  }
+  return accessibleContext;
 }
 
 } // class Checkbox 
Index: kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java
diff -u kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.14 kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.15
--- kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.14	Wed Jan  5 20:16:25 2005
+++ kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java	Thu Jan  6 00:22:46 2005
@@ -330,7 +330,7 @@
   }
   
   /**
-   * Gets the AccessibleContext associated with this <code>List</code>.
+   * Gets the AccessibleContext associated with this <code>CheckboxMenuItem</code>.
    * The context is created, if necessary.
    *
    * @return the associated context
@@ -339,10 +339,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTCheckboxMenuItem();
-      }
+      accessibleContext = new AccessibleAWTCheckboxMenuItem();
     return accessibleContext;
   }
 
Index: kaffe/libraries/javalib/java/awt/Choice.java
diff -u kaffe/libraries/javalib/java/awt/Choice.java:1.5 kaffe/libraries/javalib/java/awt/Choice.java:1.6
--- kaffe/libraries/javalib/java/awt/Choice.java:1.5	Wed Jan  5 20:16:25 2005
+++ kaffe/libraries/javalib/java/awt/Choice.java	Thu Jan  6 00:22:46 2005
@@ -566,8 +566,17 @@
     return (ItemListener[]) getListeners (ItemListener.class);
   }
 
+  /**
+   * Gets the AccessibleContext associated with this <code>Choice</code>.
+   * The context is created, if necessary.
+   *
+   * @return the associated context
+   */
   public AccessibleContext getAccessibleContext()
   {
-    return new AccessibleAWTChoice();
+    /* Create the context if this is the first request */
+    if (accessibleContext == null)
+      accessibleContext = new AccessibleAWTChoice();
+    return accessibleContext;
   }
 } // class Choice 
Index: kaffe/libraries/javalib/java/awt/Dialog.java
diff -u kaffe/libraries/javalib/java/awt/Dialog.java:1.12 kaffe/libraries/javalib/java/awt/Dialog.java:1.13
--- kaffe/libraries/javalib/java/awt/Dialog.java:1.12	Wed Jan  5 20:16:25 2005
+++ kaffe/libraries/javalib/java/awt/Dialog.java	Thu Jan  6 00:22:46 2005
@@ -545,10 +545,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTDialog();
-      }
+      accessibleContext = new AccessibleAWTDialog();
     return accessibleContext;
   }
 
Index: kaffe/libraries/javalib/java/awt/Frame.java
diff -u kaffe/libraries/javalib/java/awt/Frame.java:1.22 kaffe/libraries/javalib/java/awt/Frame.java:1.23
--- kaffe/libraries/javalib/java/awt/Frame.java:1.22	Wed Jan  5 20:16:25 2005
+++ kaffe/libraries/javalib/java/awt/Frame.java	Thu Jan  6 00:22:46 2005
@@ -583,10 +583,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTFrame();
-      }
+      accessibleContext = new AccessibleAWTFrame();
     return accessibleContext;
   }
 
Index: kaffe/libraries/javalib/java/awt/Label.java
diff -u kaffe/libraries/javalib/java/awt/Label.java:1.6 kaffe/libraries/javalib/java/awt/Label.java:1.7
--- kaffe/libraries/javalib/java/awt/Label.java:1.6	Wed Nov 24 21:49:17 2004
+++ kaffe/libraries/javalib/java/awt/Label.java	Thu Jan  6 00:22:46 2005
@@ -306,10 +306,7 @@
 {
   /* Create the context if this is the first request */
   if (accessibleContext == null)
-    {
-      /* Create the context */
-      accessibleContext = new AccessibleAWTLabel();
-    }
+    accessibleContext = new AccessibleAWTLabel();
   return accessibleContext;
 }
 
Index: kaffe/libraries/javalib/java/awt/List.java
diff -u kaffe/libraries/javalib/java/awt/List.java:1.5 kaffe/libraries/javalib/java/awt/List.java:1.6
--- kaffe/libraries/javalib/java/awt/List.java:1.5	Wed Jan  5 20:16:26 2005
+++ kaffe/libraries/javalib/java/awt/List.java	Thu Jan  6 00:22:46 2005
@@ -1257,10 +1257,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTList();
-      }
+      accessibleContext = new AccessibleAWTList();
     return accessibleContext;
   }
 } // class List
Index: kaffe/libraries/javalib/java/awt/Menu.java
diff -u kaffe/libraries/javalib/java/awt/Menu.java:1.13 kaffe/libraries/javalib/java/awt/Menu.java:1.14
--- kaffe/libraries/javalib/java/awt/Menu.java:1.13	Sun Dec 12 01:35:08 2004
+++ kaffe/libraries/javalib/java/awt/Menu.java	Thu Jan  6 00:22:46 2005
@@ -451,12 +451,18 @@
     }
   }
 
-  /* (non-Javadoc)
-   * @see java.awt.MenuComponent#getAccessibleContext()
+  /**
+   * Gets the AccessibleContext associated with this <code>Menu</code>.
+   * The context is created, if necessary.
+   *
+   * @return the associated context
    */
   public AccessibleContext getAccessibleContext()
   {
-    return new AccessibleAWTMenu();
+    /* Create the context if this is the first request */
+    if (accessibleContext == null)
+      accessibleContext = new AccessibleAWTMenu();
+    return accessibleContext;
   }
 
 } // class Menu
Index: kaffe/libraries/javalib/java/awt/MenuBar.java
diff -u kaffe/libraries/javalib/java/awt/MenuBar.java:1.10 kaffe/libraries/javalib/java/awt/MenuBar.java:1.11
--- kaffe/libraries/javalib/java/awt/MenuBar.java:1.10	Wed Nov 24 21:49:17 2004
+++ kaffe/libraries/javalib/java/awt/MenuBar.java	Thu Jan  6 00:22:46 2005
@@ -381,10 +381,7 @@
 {
   /* Create the context if this is the first request */
   if (accessibleContext == null)
-    {
-      /* Create the context */
-      accessibleContext = new AccessibleAWTMenuBar();
-    }
+    accessibleContext = new AccessibleAWTMenuBar();
   return accessibleContext;
 }
 
Index: kaffe/libraries/javalib/java/awt/MenuItem.java
diff -u kaffe/libraries/javalib/java/awt/MenuItem.java:1.17 kaffe/libraries/javalib/java/awt/MenuItem.java:1.18
--- kaffe/libraries/javalib/java/awt/MenuItem.java:1.17	Wed Jan  5 20:16:26 2005
+++ kaffe/libraries/javalib/java/awt/MenuItem.java	Thu Jan  6 00:22:46 2005
@@ -590,10 +590,7 @@
 {
   /* Create the context if this is the first request */
   if (accessibleContext == null)
-    {
-      /* Create the context */
-      accessibleContext = new AccessibleAWTMenuItem();
-    }
+    accessibleContext = new AccessibleAWTMenuItem();
   return accessibleContext;
 }
 
Index: kaffe/libraries/javalib/java/awt/PopupMenu.java
diff -u kaffe/libraries/javalib/java/awt/PopupMenu.java:1.11 kaffe/libraries/javalib/java/awt/PopupMenu.java:1.12
--- kaffe/libraries/javalib/java/awt/PopupMenu.java:1.11	Sun Dec 12 01:35:10 2004
+++ kaffe/libraries/javalib/java/awt/PopupMenu.java	Thu Jan  6 00:22:46 2005
@@ -151,9 +151,18 @@
     
   }
   
+  /**
+   * Gets the AccessibleContext associated with this <code>PopupMenu</code>.
+   * The context is created, if necessary.
+   *
+   * @return the associated context
+   */
   public AccessibleContext getAccessibleContext()
   {
-    return new AccessibleAWTPopupMenu();
+    /* Create the context if this is the first request */
+    if (accessibleContext == null)
+      accessibleContext = new AccessibleAWTPopupMenu();
+    return accessibleContext;
   }
 
 } // class PopupMenu
Index: kaffe/libraries/javalib/java/awt/ScrollPane.java
diff -u kaffe/libraries/javalib/java/awt/ScrollPane.java:1.18 kaffe/libraries/javalib/java/awt/ScrollPane.java:1.19
--- kaffe/libraries/javalib/java/awt/ScrollPane.java:1.18	Wed Jan  5 20:16:27 2005
+++ kaffe/libraries/javalib/java/awt/ScrollPane.java	Thu Jan  6 00:22:47 2005
@@ -599,7 +599,7 @@
   }
 
   /**
-   * Gets the AccessibleContext associated with this <code>Scrollbar</code>.
+   * Gets the AccessibleContext associated with this <code>ScrollPane</code>.
    * The context is created, if necessary.
    *
    * @return the associated context
@@ -608,10 +608,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTScrollPane();
-      }
+      accessibleContext = new AccessibleAWTScrollPane();
     return accessibleContext;
   }
 } // class ScrollPane 
Index: kaffe/libraries/javalib/java/awt/Scrollbar.java
diff -u kaffe/libraries/javalib/java/awt/Scrollbar.java:1.7 kaffe/libraries/javalib/java/awt/Scrollbar.java:1.8
--- kaffe/libraries/javalib/java/awt/Scrollbar.java:1.7	Wed Jan  5 20:16:27 2005
+++ kaffe/libraries/javalib/java/awt/Scrollbar.java	Thu Jan  6 00:22:47 2005
@@ -845,10 +845,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTScrollbar();
-      }
+      accessibleContext = new AccessibleAWTScrollbar();
     return accessibleContext;
   }
 
Index: kaffe/libraries/javalib/java/awt/TextArea.java
diff -u kaffe/libraries/javalib/java/awt/TextArea.java:1.6 kaffe/libraries/javalib/java/awt/TextArea.java:1.7
--- kaffe/libraries/javalib/java/awt/TextArea.java:1.6	Sun Dec 12 01:35:11 2004
+++ kaffe/libraries/javalib/java/awt/TextArea.java	Thu Jan  6 00:22:47 2005
@@ -613,8 +613,17 @@
     }
   }
   
+  /**
+   * Gets the AccessibleContext associated with this <code>TextArea</code>.
+   * The context is created, if necessary.
+   *
+   * @return the associated context
+   */
   public AccessibleContext getAccessibleContext()
   {
-    return new AccessibleAWTTextArea();
+    /* Create the context if this is the first request */
+    if (accessibleContext == null)
+      accessibleContext = new AccessibleAWTTextArea();
+    return accessibleContext;
   }
 }
Index: kaffe/libraries/javalib/java/awt/TextComponent.java
diff -u kaffe/libraries/javalib/java/awt/TextComponent.java:1.4 kaffe/libraries/javalib/java/awt/TextComponent.java:1.5
--- kaffe/libraries/javalib/java/awt/TextComponent.java:1.4	Sun Dec 12 01:35:11 2004
+++ kaffe/libraries/javalib/java/awt/TextComponent.java	Thu Jan  6 00:22:47 2005
@@ -46,6 +46,7 @@
 import java.util.EventListener;
 
 import javax.accessibility.Accessible;
+import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleRole;
 import javax.accessibility.AccessibleState;
 import javax.accessibility.AccessibleStateSet;
@@ -690,6 +691,21 @@
     return (TextListener[]) getListeners (TextListener.class);
   }
 
+  /**
+   * Gets the AccessibleContext associated with this <code>TextComponent</code>.
+   * The context is created, if necessary.
+   *
+   * @return the associated context
+   */
+  public AccessibleContext getAccessibleContext()
+  {
+    /* Create the context if this is the first request */
+    if (accessibleContext == null)
+      accessibleContext = new AccessibleAWTTextComponent();
+    return accessibleContext;
+  }
+
+  
   /*******************************/
   // Provide AccessibleAWTTextComponent access to several peer functions that
   // aren't publicly exposed.
Index: kaffe/libraries/javalib/java/awt/Window.java
diff -u kaffe/libraries/javalib/java/awt/Window.java:1.27 kaffe/libraries/javalib/java/awt/Window.java:1.28
--- kaffe/libraries/javalib/java/awt/Window.java:1.27	Thu Jan  6 00:15:32 2005
+++ kaffe/libraries/javalib/java/awt/Window.java	Thu Jan  6 00:22:49 2005
@@ -823,10 +823,7 @@
   {
     /* Create the context if this is the first request */
     if (accessibleContext == null)
-      {
-        /* Create the context */
-        accessibleContext = new AccessibleAWTWindow();
-      }
+      accessibleContext = new AccessibleAWTWindow();
     return accessibleContext;
   }
 




More information about the kaffe mailing list