001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: /**
018: * @author Dmitry A. Durnev
019: * @version $Revision$
020: */package org.apache.harmony.awt.wtk;
021:
022: import java.awt.AWTEvent;
023: import java.awt.AWTException;
024: import java.awt.Image;
025: import java.awt.Rectangle;
026: import java.awt.im.spi.InputMethod;
027: import java.awt.im.spi.InputMethodContext;
028: import java.awt.im.spi.InputMethodDescriptor;
029: import java.lang.Character.Subset;
030: import java.util.Locale;
031:
032: /**
033: * A cross-platform interface for native input
034: * method sub-system functionality.
035: */
036: public abstract class NativeIM implements InputMethod,
037: InputMethodDescriptor {
038: protected InputMethodContext imc;
039:
040: public void activate() {
041:
042: }
043:
044: public void deactivate(boolean isTemporary) {
045:
046: }
047:
048: public void dispatchEvent(AWTEvent event) {
049:
050: }
051:
052: public void dispose() {
053:
054: }
055:
056: public void endComposition() {
057:
058: }
059:
060: public Object getControlObject() {
061: return null;
062: }
063:
064: public Locale getLocale() {
065: return null;
066: }
067:
068: public void hideWindows() {
069:
070: }
071:
072: public boolean isCompositionEnabled() {
073: return false;
074: }
075:
076: public void notifyClientWindowChange(Rectangle bounds) {
077:
078: }
079:
080: public void reconvert() {
081:
082: }
083:
084: public void removeNotify() {
085:
086: }
087:
088: public void setCharacterSubsets(Subset[] subsets) {
089:
090: }
091:
092: public void setCompositionEnabled(boolean enable) {
093:
094: }
095:
096: public void setInputMethodContext(InputMethodContext context) {
097: imc = context;
098: }
099:
100: public boolean setLocale(Locale locale) {
101: return false;
102: }
103:
104: public Locale[] getAvailableLocales() throws AWTException {
105: return new Locale[] { Locale.getDefault(), Locale.ENGLISH };
106: }
107:
108: public InputMethod createInputMethod() throws Exception {
109: return this ;
110: }
111:
112: public String getInputMethodDisplayName(Locale inputLocale,
113: Locale displayLanguage) {
114: return "System input methods"; //$NON-NLS-1$
115: }
116:
117: public Image getInputMethodIcon(Locale inputLocale) {
118: return null;
119: }
120:
121: public boolean hasDynamicLocaleList() {
122: return false;
123: }
124:
125: public abstract void disableIME();
126:
127: // public abstract void disableIME(long id);
128:
129: }
|