/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* <code>InputMethodPopupMenu</code> provides the popup selection menu
*/
// Factory method to provide the menu, depending on the client, i.e.,
// provide Swing popup menu if client is a swing app, otherwise AWT popup
// is created.
return new JInputMethodPopupMenu(title);
} else {
return new AWTInputMethodPopupMenu(title);
}
}
abstract void removeAll();
abstract void addSeparator();
int localeCount;
try {
} catch (AWTException e) {
// ??? should have better error handling -
// tell user what happened, then remove this input method from the list.
// For the time being, just show it disabled.
localeCount = 0;
}
if (localeCount == 0) {
// could be IIIMP adapter which has lost its connection
} else if (localeCount == 1) {
if (descriptor.hasDynamicLocaleList()) {
// try to make sure that what the user sees and what
// we eventually select is consistent even if the locale
// list changes in the meantime
}
} else {
for (int j = 0; j < localeCount; j++) {
}
}
}
/**
* Returns whether command indicates the same input method as currentSelection,
* taking into account that command may not specify a locale where currentSelection does.
*/
return false;
}
return true;
}
// currentSelection may indicate a locale where command does not
return true;
}
return false;
}
/**
* Returns a localized locale name for input methods with the
* given locale. It falls back to Locale.getDisplayName() and
* then to Locale.toString() if no localized locale name is found.
*
* @param locale Locale for which localized locale name is obtained
*/
if (localeName == null) {
}
return localeName;
}
// ActionListener implementation
}
}
synchronized (this) {
}
}
}
}
void removeAll() {
}
void addSeparator() {
}
}
}
}
}
} else {
}
menuItem.addActionListener(this);
if (targetMenu instanceof JMenu) {
} else {
}
}
}
synchronized (this) {
}
}
}
}
void removeAll() {
}
void addSeparator() {
}
}
}
}
}
} else {
}
menuItem.addActionListener(this);
}
}