Methods Summary |
---|
public void | activate()
if (!statusWindow.isVisible()) {
statusWindow.setVisible(true);
}
|
public void | deactivate(boolean isTemporary)
|
public void | dispatchEvent(java.awt.AWTEvent event)
if (event.getID() == KeyEvent.KEY_TYPED) {
KeyEvent e = (KeyEvent) event;
if (handleCharacter(e.getKeyChar())) {
e.consume();
}
}
|
public void | dispose()
|
public void | endComposition()
|
public java.lang.Object | getControlObject()
return null;
|
public java.util.Locale | getLocale()
return locale;
|
private boolean | handleCharacter(char ch)
switch(ch) {
case 'a":
write('\u05D0"); // Hebrew Letter Aleph
return true;
case 'b":
write('\u05D1"); // Hebrew Letter Bet
return true;
case 'g":
write('\u05D2"); // Hebrew Letter Gimmel
return true;
case 'd":
write('\u05D3"); // Hebrew Letter Dalet
return true;
case 'h":
write('\u05D4"); // Hebrew Letter He
return true;
case 'v":
write('\u05D5"); // Hebrew Letter Vav
return true;
case 'z":
write('\u05D6"); // Hebrew Letter Zayin
return true;
case 'k":
write('\u05D7"); // Hebrew Letter Het
return true;
case 'j":
write('\u05D8"); // Hebrew Letter Tet
return true;
case 'y":
write('\u05D9"); // Hebrew Letter Yod
return true;
case '\'":
write('\u05DA"); // Hebrew Letter Final Kaf
return true;
case 'c":
write('\u05DB"); // Hebrew Letter Kaf
return true;
case 'l":
write('\u05DC"); // Hebrew Letter Lamed
return true;
case '.":
write('\u05DD"); // Hebrew Letter Final Mem
return true;
case 'm":
write('\u05DE"); // Hebrew Letter Mem
return true;
case ',":
write('\u05DF"); // Hebrew Letter Final Nun
return true;
case 'n":
write('\u05E0"); // Hebrew Letter Nun
return true;
case 's":
write('\u05E1"); // Hebrew Letter Samekh
return true;
case 'i":
write('\u05E2"); // Hebrew Letter Ayin
return true;
case 'p":
write('\u05E3"); // Hebrew Letter Final Pe
return true;
case 'f":
write('\u05E4"); // Hebrew Letter Pe
return true;
case ';":
write('\u05E5"); // Hebrew Letter Final Tsadi
return true;
case 'x":
write('\u05E6"); // Hebrew Letter Tsadi
return true;
case 'q":
write('\u05E7"); // Hebrew Letter Qof
return true;
case 'r":
write('\u05E8"); // Hebrew Letter Resh
return true;
case 'w":
write('\u05E9"); // Hebrew Letter Shin
return true;
case 't":
write('\u05EA"); // Hebrew Letter Tav
return true;
}
return false;
|
public void | hideWindows()
statusWindow.hide();
|
public boolean | isCompositionEnabled()
return true;
|
public void | notifyClientWindowChange(java.awt.Rectangle location)
|
public void | reconvert()
throw new UnsupportedOperationException();
|
public void | removeNotify()
|
public void | setCharacterSubsets(java.lang.Character$Subset[] subsets)
|
public void | setCompositionEnabled(boolean enable)
throw new UnsupportedOperationException();
|
public void | setInputMethodContext(java.awt.im.spi.InputMethodContext context)
inputMethodContext = context;
if (statusWindow == null) {
statusWindow = context.createInputMethodWindow("Simple Input Method",
false);
Label label = new Label();
label.setBackground(Color.lightGray);
label.setText(locale.getDisplayName() + "Input Method Active");
statusWindow.add(label);
label.setSize(200, 50);
statusWindow.add(label);
statusWindow.pack();
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
statusWindow.setLocation(d.width - statusWindow.getWidth(),
d.height - statusWindow.getHeight());
}
|
public boolean | setLocale(java.util.Locale locale)
return (locale.equals(this.locale));
|
private void | write(char ch)
AttributedString as = new AttributedString(String.valueOf(ch));
inputMethodContext.dispatchInputMethodEvent(
InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
as.getIterator(),
1,
null,
null);
|