(int keyCode)
| 898 | |
| 899 | /// {@inheritDoc} |
| 900 | @Override |
| 901 | public void keyReleased(int keyCode) { |
| 902 | // other events are in keyReleased to prevent the next event from reaching the next form |
| 903 | int gameAction = Display.getInstance().getGameAction(keyCode); |
| 904 | if (gameAction == Display.GAME_FIRE) { |
| 905 | boolean h = handlesInput(); |
| 906 | setHandlesInput(!h); |
| 907 | if (h) { |
| 908 | fireActionEvent(); |
| 909 | } |
| 910 | repaint(); |
| 911 | return; |
| 912 | } |
| 913 | |
| 914 | if (numericKeyActions && gameAction != Display.GAME_LEFT && |
| 915 | gameAction != Display.GAME_RIGHT && gameAction != Display.GAME_UP && |
| 916 | gameAction != Display.GAME_DOWN) { |
| 917 | if (keyCode >= '1' && keyCode <= '9') { |
| 918 | int offset = keyCode - '1'; |
| 919 | if (offset < getModel().getSize()) { |
| 920 | setSelectedIndex(offset); |
| 921 | fireActionEvent(); |
| 922 | } |
| 923 | } |
| 924 | } |
| 925 | } |
| 926 | |
| 927 | /// {@inheritDoc} |
| 928 | @Override |
nothing calls this directly
no test coverage detected