162163164165166167168169170171172
} @Override public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) { PushButton pushButton = (PushButton)getComponent(); pushButton.press(); return true; } } protected abstract class ButtonImage extends Image {
7879808182838485868788
if (pushButton.isFocusable()) { pushButton.requestFocus(); } pushButton.press(); return consumed; } @Override
107108109110111112113114115116117
if (keyCode == Keyboard.KeyCode.SPACE) { pressed = false; repaintComponent(); pushButton.press(); } else { consumed = super.keyReleased(component, keyCode, keyLocation); } return consumed;