Package com.jbstrap.ui
Interface HandleKeyboardEvents<T extends Component<?>>
- Type Parameters:
T
- The component type
- All Known Implementing Classes:
ColorPicker
,DatePicker
,DateRangePicker
,IntegerItem
,NumberItem
,PasswordItem
,TextItem
public interface HandleKeyboardEvents<T extends Component<?>>
Keyboard event handling components
The components that implement the interface can handle keyboard events. These keyboard events are:
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
addKeyDownHandler
(KeyDownEventHandler handler) Adds a keyboard key down event handler to the component.default T
addKeyPressHandler
(KeyPressEventHandler handler) Adds a keyboard key press event handler to the component.default T
addKeyUpHandler
(KeyUpEventHandler handler) Adds a keyboard key up event handler to the component.
-
Method Details
-
addKeyPressHandler
Adds a keyboard key press event handler to the component. The handler will run when the user presses a key, while the component is in focus.- Parameters:
handler
- TheKeyPressEventHandler
implementation- Returns:
- The component
- See Also:
-
addKeyUpHandler
Adds a keyboard key up event handler to the component. The handler will run when the user releases a pressed a key, while the component is in focus.- Parameters:
handler
- TheKeyUpEventHandler
implementation- Returns:
- The component
- See Also:
-
addKeyDownHandler
Adds a keyboard key down event handler to the component. The handler will run when the user presses a key, while the component is in focus.- Parameters:
handler
- TheKeyDownEventHandler
implementation- Returns:
- The component
- See Also:
-