OSDN Git Service

Merged gcj-eclipse branch to trunk.
[pf3gnuchains/gcc-fork.git] / libjava / classpath / java / awt / im / InputContext.java
index 3806736..c819932 100644 (file)
@@ -1,5 +1,5 @@
 /* InputContext.java -- provides the context for text input
-   Copyright (C) 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -76,6 +76,7 @@ import java.util.Locale;
  * java.awt.im.spi.InputMethodDescriptor.
  *
  * @author Eric Blake (ebb9@email.byu.edu)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
  * @see Component#getInputContext()
  * @see Component#enableInputMethods(boolean)
  * @since 1.2
@@ -86,7 +87,9 @@ public class InputContext
   /**
    * The list of installed input method descriptors.
    */
-  private static final ArrayList descriptors = new ArrayList();
+  private static final ArrayList<InputMethodDescriptor> descriptors
+    = new ArrayList<InputMethodDescriptor>();
+
   static
   {
     Enumeration e;
@@ -123,7 +126,7 @@ public class InputContext
               {
                 if (line.charAt(0) != '#')
                   {
-                    Class c = Class.forName(line);
+                    Class<?> c = Class.forName(line);
                     descriptors.add((InputMethodDescriptor) c.newInstance());
                   }
                 line = in.readLine().trim();
@@ -143,7 +146,8 @@ public class InputContext
   private InputMethod im;
 
   /** Map of locales to the most recently selected input method. */
-  private final HashMap recent = new HashMap();
+  private final HashMap<Locale,InputMethod> recent 
+    = new HashMap<Locale,InputMethod>();
 
   /** The list of acceptable character subsets. */
   private Character.Subset[] subsets;