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 TaddKeyDownHandler(KeyDownEventHandler handler) Adds a keyboard key down event handler to the component.default TaddKeyPressHandler(KeyPressEventHandler handler) Adds a keyboard key press event handler to the component.default TaddKeyUpHandler(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- TheKeyPressEventHandlerimplementation- 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- TheKeyUpEventHandlerimplementation- 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- TheKeyDownEventHandlerimplementation- Returns:
- The component
- See Also:
-