diff options
Diffstat (limited to 'libjava/classpath/java/awt/im')
-rw-r--r-- | libjava/classpath/java/awt/im/InputContext.java | 12 | ||||
-rw-r--r-- | libjava/classpath/java/awt/im/InputMethodHighlight.java | 7 | ||||
-rw-r--r-- | libjava/classpath/java/awt/im/spi/InputMethodContext.java | 3 |
3 files changed, 14 insertions, 8 deletions
diff --git a/libjava/classpath/java/awt/im/InputContext.java b/libjava/classpath/java/awt/im/InputContext.java index 3806736df3d..c81993215e8 100644 --- a/libjava/classpath/java/awt/im/InputContext.java +++ b/libjava/classpath/java/awt/im/InputContext.java @@ -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; diff --git a/libjava/classpath/java/awt/im/InputMethodHighlight.java b/libjava/classpath/java/awt/im/InputMethodHighlight.java index 6fbe42fe549..a2ee86d44fc 100644 --- a/libjava/classpath/java/awt/im/InputMethodHighlight.java +++ b/libjava/classpath/java/awt/im/InputMethodHighlight.java @@ -41,6 +41,7 @@ import java.awt.Toolkit; import java.text.Annotation; import java.text.AttributedCharacterIterator; import java.util.Map; +import java.awt.font.TextAttribute; /** * This describes the highlight attributes of text composed in an input method. @@ -95,7 +96,7 @@ public class InputMethodHighlight private final int variation; /** The unmodifiable map of rendering styles. */ - private final Map style; + private final Map<TextAttribute, ?> style; /** * Create an input method highlight style, with variation 0 and null style @@ -134,7 +135,7 @@ public class InputMethodHighlight * @since 1.3 */ public InputMethodHighlight(boolean selected, int state, int variation, - Map style) + Map<TextAttribute, ?> style) { if (state != RAW_TEXT && state != CONVERTED_TEXT) throw new IllegalArgumentException(); @@ -181,7 +182,7 @@ public class InputMethodHighlight * @return the style map * @since 1.3 */ - public Map getStyle() + public Map<TextAttribute, ?> getStyle() { return style; } diff --git a/libjava/classpath/java/awt/im/spi/InputMethodContext.java b/libjava/classpath/java/awt/im/spi/InputMethodContext.java index 17ec4f8f7ee..aed21e8d3b4 100644 --- a/libjava/classpath/java/awt/im/spi/InputMethodContext.java +++ b/libjava/classpath/java/awt/im/spi/InputMethodContext.java @@ -1,5 +1,5 @@ /* InputMethodContext.java -- communication between an input method and client - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,6 +53,7 @@ import javax.swing.JFrame; * {@link InputMethod#setInputMethodContext(InputMethodContext)}. * * @author Eric Blake (ebb9@email.byu.edu) + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.3 * @status updated to 1.4 */ |