<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FI18N%2FInputMethod</id>
		<title>Java Tutorial/I18N/InputMethod - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FI18N%2FInputMethod"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/I18N/InputMethod&amp;action=history"/>
		<updated>2026-04-22T06:33:59Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_Tutorial/I18N/InputMethod&amp;diff=4532&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/I18N/InputMethod&amp;diff=4532&amp;oldid=prev"/>
				<updated>2010-06-01T05:02:52Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 05:02, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_Tutorial/I18N/InputMethod&amp;diff=4531&amp;oldid=prev</id>
		<title> в 17:44, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/I18N/InputMethod&amp;diff=4531&amp;oldid=prev"/>
				<updated>2010-05-31T17:44:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==  implements InputMethod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import java.awt.AWTEvent;&lt;br /&gt;
import java.awt.Color;&lt;br /&gt;
import java.awt.Dimension;&lt;br /&gt;
import java.awt.Image;&lt;br /&gt;
import java.awt.Label;&lt;br /&gt;
import java.awt.Rectangle;&lt;br /&gt;
import java.awt.Toolkit;&lt;br /&gt;
import java.awt.Window;&lt;br /&gt;
import java.awt.event.InputMethodEvent;&lt;br /&gt;
import java.awt.event.KeyEvent;&lt;br /&gt;
import java.awt.im.spi.InputMethod;&lt;br /&gt;
import java.awt.im.spi.InputMethodContext;&lt;br /&gt;
import java.awt.im.spi.InputMethodDescriptor;&lt;br /&gt;
import java.text.AttributedString;&lt;br /&gt;
import java.util.Locale;&lt;br /&gt;
public class SimpleInputMethod implements InputMethod {&lt;br /&gt;
  private static Window statusWindow;&lt;br /&gt;
  private InputMethodContext inputMethodContext;&lt;br /&gt;
  private Locale locale;&lt;br /&gt;
  public SimpleInputMethod() {&lt;br /&gt;
    locale = new Locale(&amp;quot;iw&amp;quot;, &amp;quot;IL&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  public void activate() {&lt;br /&gt;
    if (!statusWindow.isVisible()) {&lt;br /&gt;
      statusWindow.setVisible(true);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public void deactivate(boolean isTemporary) {&lt;br /&gt;
  }&lt;br /&gt;
  public void dispatchEvent(AWTEvent event) {&lt;br /&gt;
    if (event.getID() == KeyEvent.KEY_TYPED) {&lt;br /&gt;
      KeyEvent e = (KeyEvent) event;&lt;br /&gt;
      if (handleCharacter(e.getKeyChar())) {&lt;br /&gt;
        e.consume();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public void dispose() {&lt;br /&gt;
  }&lt;br /&gt;
  public void endComposition() {&lt;br /&gt;
  }&lt;br /&gt;
  public Object getControlObject() {&lt;br /&gt;
    return null;&lt;br /&gt;
  }&lt;br /&gt;
  public Locale getLocale() {&lt;br /&gt;
    return locale;&lt;br /&gt;
  }&lt;br /&gt;
  public void hideWindows() {&lt;br /&gt;
    statusWindow.setVisible(false);&lt;br /&gt;
  }&lt;br /&gt;
  public boolean isCompositionEnabled() {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
  public void removeNotify() {&lt;br /&gt;
  }&lt;br /&gt;
  public void setCharacterSubsets(Character.Subset[] subsets) {&lt;br /&gt;
  }&lt;br /&gt;
  public void setCompositionEnabled(boolean enable) {&lt;br /&gt;
    throw new UnsupportedOperationException();&lt;br /&gt;
  }&lt;br /&gt;
  public void notifyClientWindowChange(Rectangle location) {&lt;br /&gt;
  }&lt;br /&gt;
  public void reconvert() {&lt;br /&gt;
    throw new UnsupportedOperationException();&lt;br /&gt;
  }&lt;br /&gt;
  public void setInputMethodContext(InputMethodContext context) {&lt;br /&gt;
    inputMethodContext = context;&lt;br /&gt;
    if (statusWindow == null) {&lt;br /&gt;
      statusWindow = context.createInputMethodWindow(&amp;quot;Simple Input Method&amp;quot;, false);&lt;br /&gt;
      Label label = new Label();&lt;br /&gt;
      label.setText(locale.getDisplayName());&lt;br /&gt;
      statusWindow.add(label);&lt;br /&gt;
      label.setSize(200, 50);&lt;br /&gt;
      statusWindow.add(label);&lt;br /&gt;
      statusWindow.pack();&lt;br /&gt;
      Dimension d = Toolkit.getDefaultToolkit().getScreenSize();&lt;br /&gt;
      statusWindow.setLocation(d.width - statusWindow.getWidth(), d.height&lt;br /&gt;
          - statusWindow.getHeight());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public boolean setLocale(Locale locale) {&lt;br /&gt;
    return (locale.equals(this.locale));&lt;br /&gt;
  }&lt;br /&gt;
  private boolean handleCharacter(char ch) {&lt;br /&gt;
    switch (ch) {&lt;br /&gt;
    case &amp;quot;a&amp;quot;:&lt;br /&gt;
      write(&amp;quot;\u05D0&amp;quot;); &lt;br /&gt;
      return true;&lt;br /&gt;
    case &amp;quot;b&amp;quot;:&lt;br /&gt;
      write(&amp;quot;\u05D1&amp;quot;); &lt;br /&gt;
      return true;&lt;br /&gt;
    }&lt;br /&gt;
    return false;&lt;br /&gt;
  }&lt;br /&gt;
  private void write(char ch) {&lt;br /&gt;
    AttributedString as = new AttributedString(String.valueOf(ch));&lt;br /&gt;
    inputMethodContext.dispatchInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, as&lt;br /&gt;
        .getIterator(), 1, null, null);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class SimpleInputMethodDescriptor implements InputMethodDescriptor {&lt;br /&gt;
  private static Locale HEBREW = new Locale(&amp;quot;iw&amp;quot;, &amp;quot;IL&amp;quot;);&lt;br /&gt;
  public SimpleInputMethodDescriptor() {&lt;br /&gt;
  }&lt;br /&gt;
  public InputMethod createInputMethod() throws Exception {&lt;br /&gt;
    return new SimpleInputMethod();&lt;br /&gt;
  }&lt;br /&gt;
  public Locale[] getAvailableLocales() {&lt;br /&gt;
    Locale[] locales = { HEBREW };&lt;br /&gt;
    return locales;&lt;br /&gt;
  }&lt;br /&gt;
  public boolean hasDynamicLocaleList() {&lt;br /&gt;
    return false;&lt;br /&gt;
  }&lt;br /&gt;
  public String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) {&lt;br /&gt;
    return &amp;quot;Hebrew Input Method&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  public Image getInputMethodIcon(Locale inputLocale) {&lt;br /&gt;
    return null;&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>