2 *******************************************************************************
\r
3 * Copyright (C) 2000-2004, International Business Machines Corporation and *
\r
4 * others. All Rights Reserved. *
\r
5 *******************************************************************************
\r
8 package com.ibm.icu.dev.tool.ime.indic;
\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
19 * This stub delegates to the simpler IndicInputMethodImpl.
\r
21 class IndicInputMethod implements InputMethod {
\r
22 private IndicInputMethodImpl impl;
\r
23 private Locale locale;
\r
25 IndicInputMethod(Locale theLocale, IndicInputMethodImpl theImplementation) {
\r
27 impl = theImplementation;
\r
30 public void setInputMethodContext(InputMethodContext context) {
\r
31 impl.setInputMethodContext(context);
\r
34 public boolean setLocale(Locale locale) {
\r
35 return locale.getLanguage().equals(this.locale.getLanguage());
\r
38 public Locale getLocale() {
\r
42 public void setCharacterSubsets(Subset[] subsets) {
\r
45 public void setCompositionEnabled(boolean enable) {
\r
46 throw new UnsupportedOperationException();
\r
49 public boolean isCompositionEnabled() {
\r
53 public void reconvert() {
\r
54 throw new UnsupportedOperationException("This input method does not reconvert.");
\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
67 public void notifyClientWindowChange(Rectangle bounds) {
\r
70 public void activate() {
\r
73 public void deactivate(boolean isTemporary) {
\r
76 public void hideWindows() {
\r
79 public void removeNotify() {
\r
82 public void endComposition() {
\r
83 impl.endComposition();
\r
86 public void dispose() {
\r
89 public Object getControlObject() {
\r