]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_4_2-src/tools/misc/src/com/ibm/icu/dev/tool/ime/indic/IndicInputMethod.java
go
[Dictionary.git] / jars / icu4j-4_4_2-src / tools / misc / src / com / ibm / icu / dev / tool / ime / indic / IndicInputMethod.java
1 /*\r
2  *******************************************************************************\r
3  * Copyright (C) 2000-2004, International Business Machines Corporation and    *\r
4  * others. All Rights Reserved.                                                *\r
5  *******************************************************************************\r
6  */\r
7 \r
8 package com.ibm.icu.dev.tool.ime.indic;\r
9 \r
10 import java.awt.AWTEvent;\r
11 import java.awt.Rectangle;\r
12 import java.awt.event.KeyEvent;\r
13 import java.awt.im.spi.InputMethod;\r
14 import java.awt.im.spi.InputMethodContext;\r
15 import java.lang.Character.Subset;\r
16 import java.util.Locale;\r
17 \r
18 /**\r
19  * This stub delegates to the simpler IndicInputMethodImpl.\r
20  */\r
21 class IndicInputMethod implements InputMethod {\r
22     private IndicInputMethodImpl impl;\r
23     private Locale locale;\r
24     \r
25     IndicInputMethod(Locale theLocale, IndicInputMethodImpl theImplementation) {\r
26         locale = theLocale;\r
27         impl = theImplementation;\r
28     }\r
29     \r
30     public void setInputMethodContext(InputMethodContext context) {\r
31         impl.setInputMethodContext(context);\r
32     }\r
33 \r
34     public boolean setLocale(Locale locale) {\r
35         return locale.getLanguage().equals(this.locale.getLanguage());\r
36     }\r
37 \r
38     public Locale getLocale() {\r
39         return locale;\r
40     }\r
41     \r
42     public void setCharacterSubsets(Subset[] subsets) {\r
43     }\r
44 \r
45     public void setCompositionEnabled(boolean enable) {\r
46         throw new UnsupportedOperationException();\r
47     }\r
48 \r
49     public boolean isCompositionEnabled() {\r
50         return true;\r
51     }\r
52 \r
53     public void reconvert() {\r
54         throw new UnsupportedOperationException("This input method does not reconvert.");\r
55     }\r
56 \r
57     public void dispatchEvent(AWTEvent event) {\r
58         if (event instanceof KeyEvent) {\r
59             KeyEvent keyEvent = (KeyEvent) event;\r
60             if (event.getID() == KeyEvent.KEY_TYPED) {\r
61                 impl.handleKeyTyped(keyEvent);\r
62             }\r
63 \r
64         }\r
65     }\r
66 \r
67     public void notifyClientWindowChange(Rectangle bounds) {\r
68     }\r
69 \r
70     public void activate() {\r
71     }\r
72 \r
73     public void deactivate(boolean isTemporary) {\r
74     }\r
75 \r
76     public void hideWindows() {\r
77     }\r
78   \r
79     public void removeNotify() {\r
80     }\r
81 \r
82     public void endComposition() {\r
83         impl.endComposition();\r
84     }\r
85 \r
86     public void dispose() {\r
87     }\r
88 \r
89     public Object getControlObject() {\r
90         return null;\r
91     }\r
92 }\r