public class KeyEventState
extends java.lang.Object
implements java.awt.event.KeyListener, java.awt.event.MouseListener
Modifier and Type | Class and Description |
---|---|
protected static class |
KeyEventState.InputState |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Object,KeyEventState.InputState> |
keyStateMap |
protected int |
modifiers |
protected int |
modifiersEx |
protected int |
mouseModifiers |
protected int |
mouseModifiersEx |
Constructor and Description |
---|
KeyEventState() |
Modifier and Type | Method and Description |
---|---|
void |
clearKeyState() |
protected KeyEventState.InputState |
getKeyState(int keyCode) |
int |
getModifiers() |
int |
getModifiersEx() |
int |
getMouseModifiers() |
int |
getMouseModifiersEx() |
int |
getNumButtonsDown() |
int |
getNumKeysDown() |
protected long |
getTimeStamp(java.awt.event.InputEvent e,
int eventType,
KeyEventState.InputState currentState) |
boolean |
isKeyDown(int keyCode) |
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
int |
keyState(int keyCode) |
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
mouseClicked(java.awt.event.MouseEvent mouseEvent) |
void |
mouseEntered(java.awt.event.MouseEvent mouseEvent) |
void |
mouseExited(java.awt.event.MouseEvent mouseEvent) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
protected void |
onKeyEvent(java.awt.event.KeyEvent e,
int eventType) |
protected void |
removeKeyState(java.awt.event.KeyEvent e) |
protected void |
setKeyState(int keyCode,
KeyEventState.InputState state) |
protected void |
setModifiers(int modifiers) |
protected void |
setModifiersEx(int modifiersEx) |
protected void |
setMouseModifiers(int modifiers) |
protected void |
setMouseModifiersEx(int modifiersEx) |
protected java.util.Map<java.lang.Object,KeyEventState.InputState> keyStateMap
protected int modifiers
protected int modifiersEx
protected int mouseModifiers
protected int mouseModifiersEx
public void clearKeyState()
protected KeyEventState.InputState getKeyState(int keyCode)
public int getModifiers()
public int getModifiersEx()
public int getMouseModifiers()
public int getMouseModifiersEx()
public int getNumButtonsDown()
public int getNumKeysDown()
protected long getTimeStamp(java.awt.event.InputEvent e, int eventType, KeyEventState.InputState currentState)
public boolean isKeyDown(int keyCode)
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public int keyState(int keyCode)
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent mouseEvent)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
protected void onKeyEvent(java.awt.event.KeyEvent e, int eventType)
protected void removeKeyState(java.awt.event.KeyEvent e)
protected void setKeyState(int keyCode, KeyEventState.InputState state)
protected void setModifiers(int modifiers)
protected void setModifiersEx(int modifiersEx)
protected void setMouseModifiers(int modifiers)
protected void setMouseModifiersEx(int modifiersEx)