FileDocCategorySizeDatePackage
CityInputMethodDescriptor.javaAPI DocExample3096Wed Apr 19 11:19:40 BST 2000com.sun.demos.cityim.internal

CityInputMethodDescriptor

public class CityInputMethodDescriptor extends Object implements InputMethodDescriptor
Provides sufficient information about an input method to enable selection and loading of that input method. The input method itself is only loaded when it is actually used.

Fields Summary
private static Locale
YOMI
Constructors Summary
public CityInputMethodDescriptor()


      
    
Methods Summary
public java.awt.im.spi.InputMethodcreateInputMethod()

see
java.awt.im.spi.InputMethodDescriptor#createInputMethod

        return new CityInputMethod();
    
public java.util.Locale[]getAvailableLocales()

see
java.awt.im.spi.InputMethodDescriptor#getAvailableLocales

        Locale[] locales = {Locale.ENGLISH,
                            Locale.GERMAN,
                            Locale.JAPANESE,
                            YOMI,
                            Locale.SIMPLIFIED_CHINESE,
                            Locale.TRADITIONAL_CHINESE};
        return locales;
    
public synchronized java.lang.StringgetInputMethodDisplayName(java.util.Locale inputLocale, java.util.Locale displayLanguage)

see
java.awt.im.spi.InputMethodDescriptor#getInputMethodDisplayName

        String localeName = null;
        if (inputLocale == Locale.ENGLISH) {
            localeName = "English";
        } else if (inputLocale == Locale.GERMAN) {
            localeName = "German";
        } else if (inputLocale == Locale.JAPANESE) {
            localeName = "Japanese";
        } else if (inputLocale == YOMI) {
            localeName = "Japanese Reading";
        } else if (inputLocale == Locale.SIMPLIFIED_CHINESE) {
            localeName = "Simplified Chinese";
        } else if (inputLocale == Locale.TRADITIONAL_CHINESE) {
            localeName = "Traditional Chinese";
        }
        if (localeName != null) {
            return "City Input Method - " + localeName;
        } else {
            return "City Input Method";
        }
    
public java.awt.ImagegetInputMethodIcon(java.util.Locale inputLocale)

see
java.awt.im.spi.InputMethodDescriptor#getInputMethodIcon

        return null;
    
public booleanhasDynamicLocaleList()

see
java.awt.im.spi.InputMethodDescriptor#hasDynamicLocaleList

        return false;
    
public java.lang.StringtoString()

	Locale loc[] = getAvailableLocales();
	String locnames = null;

	for (int i = 0; i < loc.length; i++) {
	    if (locnames == null) {
		locnames = loc[i].toString();
	    } else {
		locnames += "," + loc[i];
	    }
	}
	return getClass().getName() + "[" +
	    "locales=" + locnames +
	    ",localelist=" + (hasDynamicLocaleList() ? "dynamic" : "static") +
	    "]";