Package net.regsirius06.engine.control
Interface UIKeyListener
- All Superinterfaces:
EventListener,KeyListener
- All Known Implementing Classes:
AbstractLabyrinthPanel,LabyrinthPanel
An interface for handling key events in a user interface (UI).
This interface extends
KeyListener and provides default implementations
for the keyTyped(KeyEvent) and keyReleased(KeyEvent) methods,
allowing implementers to focus on the KeyListener.keyPressed(KeyEvent) method.
Implementers of this interface only need to override the KeyListener.keyPressed(KeyEvent) method
to handle key press events, as the other methods are provided with default no-op behavior.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidInvoked when a key has been released.default voidInvoked when a key has been typed.Methods inherited from interface java.awt.event.KeyListener
keyPressed
-
Method Details
-
keyTyped
Invoked when a key has been typed. This method is empty by default, meaning no action is performed. Implementers can override this method if they want to handle key typed events.- Specified by:
keyTypedin interfaceKeyListener- Parameters:
e- the KeyEvent containing details about the key event (such as the key code and the key character)
-
keyReleased
Invoked when a key has been released. This method is empty by default, meaning no action is performed. Implementers can override this method if they want to handle key released events.- Specified by:
keyReleasedin interfaceKeyListener- Parameters:
e- the KeyEvent containing details about the key event (such as the key code and the key state)
-