org.microemu.device.j2se
Class J2SEInputMethod

java.lang.Object
  extended by org.microemu.device.InputMethod
      extended by org.microemu.device.impl.InputMethodImpl
          extended by org.microemu.device.j2se.J2SEInputMethod
All Implemented Interfaces:
java.lang.Runnable

public class J2SEInputMethod
extends InputMethodImpl


Field Summary
 
Fields inherited from class org.microemu.device.impl.InputMethodImpl
lastButton, lastButtonCharIndex, resetKey
 
Fields inherited from class org.microemu.device.InputMethod
INPUT_123, INPUT_ABC_LOWER, INPUT_ABC_UPPER, INPUT_NONE, inputMethodListener, maxSize
 
Constructor Summary
J2SEInputMethod()
           
 
Method Summary
 void buttonPressed(J2SEButton button, char keyChar)
           
 void buttonReleased(J2SEButton button, char keyChar)
           
 void buttonTyped(J2SEButton button)
           
 void clipboardPaste(java.lang.String str)
           
protected  boolean fireInputMethodListener(J2SEButton button, char keyChar)
           
 J2SEButton getButton(java.awt.event.KeyEvent ev)
           
 int getGameAction(int keyCode)
          Gets the game action associated with the given key code of the device.
 int getKeyCode(int gameAction)
           
 java.lang.String getKeyName(int keyCode)
           
 
Methods inherited from class org.microemu.device.impl.InputMethodImpl
dispose, filterConstraints, filterInputMode, insertText, pointerDragged, pointerPressed, pointerReleased, run, setInputMethodListener
 
Methods inherited from class org.microemu.device.InputMethod
getInputMode, removeInputMethodListener, setInputMode, setMaxSize, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J2SEInputMethod

public J2SEInputMethod()
Method Detail

getGameAction

public int getGameAction(int keyCode)
Gets the game action associated with the given key code of the device.

Specified by:
getGameAction in class InputMethod
Returns:
the game action corresponding to this key, or 0 if none

getKeyCode

public int getKeyCode(int gameAction)
Specified by:
getKeyCode in class InputMethod
Returns:
a key code corresponding to this game action
Throws:
java.lang.IllegalArgumentException - if gameAction is not a valid game action

getKeyName

public java.lang.String getKeyName(int keyCode)
                            throws java.lang.IllegalArgumentException
Specified by:
getKeyName in class InputMethod
Returns:
a string name for the key
Throws:
java.lang.IllegalArgumentException - if keyCode is not a valid key code

fireInputMethodListener

protected boolean fireInputMethodListener(J2SEButton button,
                                          char keyChar)

buttonTyped

public void buttonTyped(J2SEButton button)

clipboardPaste

public void clipboardPaste(java.lang.String str)

buttonPressed

public void buttonPressed(J2SEButton button,
                          char keyChar)

buttonReleased

public void buttonReleased(J2SEButton button,
                           char keyChar)

getButton

public J2SEButton getButton(java.awt.event.KeyEvent ev)


Copyright © 2001-2010 MicroEmulator Team. All Rights Reserved.