Source Code Cross Referenced for InputMethodDescriptor.java in  » 6.0-JDK-Core » AWT » java » awt » im » spi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt.im.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025
026        package java.awt.im.spi;
027
028        import java.awt.AWTException;
029        import java.awt.Image;
030        import java.util.Locale;
031
032        /**
033         * Defines methods that provide sufficient information about an input method
034         * to enable selection and loading of that input method.
035         * The input method itself is only loaded when it is actually used.
036         * 
037         * @since 1.3
038         */
039
040        public interface InputMethodDescriptor {
041
042            /**
043             * Returns the locales supported by the corresponding input method.
044             * The locale may describe just the language, or may also include
045             * country and variant information if needed.
046             * The information is used to select input methods by locale
047             * ({@link java.awt.im.InputContext#selectInputMethod(Locale)}). It may also
048             * be used to sort input methods by locale in a user-visible
049             * list of input methods.
050             * <p>
051             * Only the input method's primary locales should be returned.
052             * For example, if a Japanese input method also has a pass-through
053             * mode for Roman characters, typically still only Japanese would
054             * be returned. Thus, the list of locales returned is typically
055             * a subset of the locales for which the corresponding input method's
056             * implementation of {@link java.awt.im.spi.InputMethod#setLocale} returns true.
057             * <p>
058             * If {@link #hasDynamicLocaleList} returns true, this method is
059             * called each time the information is needed. This
060             * gives input methods that depend on network resources the chance
061             * to add or remove locales as resources become available or
062             * unavailable.
063             *
064             * @return the locales supported by the input method
065             * @exception AWTException if it can be determined that the input method
066             * is inoperable, for example, because of incomplete installation.
067             */
068            Locale[] getAvailableLocales() throws AWTException;
069
070            /**
071             * Returns whether the list of available locales can change
072             * at runtime. This may be the case, for example, for adapters
073             * that access real input methods over the network.
074             */
075            boolean hasDynamicLocaleList();
076
077            /**
078             * Returns the user-visible name of the corresponding
079             * input method for the given input locale in the language in which
080             * the name will be displayed.
081             * <p>
082             * The inputLocale parameter specifies the locale for which text
083             * is input.
084             * This parameter can only take values obtained from this descriptor's
085             * {@link #getAvailableLocales} method or null. If it is null, an
086             * input locale independent name for the input method should be
087             * returned.
088             * <p>
089             * If a name for the desired display language is not available, the
090             * method may fall back to some other language.
091             *
092             * @param inputLocale the locale for which text input is supported, or null
093             * @param displayLanguage the language in which the name will be displayed
094             */
095            String getInputMethodDisplayName(Locale inputLocale,
096                    Locale displayLanguage);
097
098            /**
099             * Returns an icon for the corresponding input method.
100             * The icon may be used by a user interface for selecting input methods.
101             * <p>
102             * The inputLocale parameter specifies the locale for which text
103             * is input.
104             * This parameter can only take values obtained from this descriptor's
105             * {@link #getAvailableLocales} method or null. If it is null, an
106             * input locale independent icon for the input method should be
107             * returned.
108             * <p>
109             * The icon's size should be 16&times;16 pixels.
110             *
111             * @param inputLocale the locale for which text input is supported, or null
112             * @return an icon for the corresponding input method, or null
113             */
114            Image getInputMethodIcon(Locale inputLocale);
115
116            /**
117             * Creates a new instance of the corresponding input method.
118             * 
119             * @return a new instance of the corresponding input method
120             * @exception Exception any exception that may occur while creating the
121             * input method instance
122             */
123            InputMethod createInputMethod() throws Exception;
124        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.