Module is.codion.swing.common.ui
Interface ControlKeyStrokes
public interface ControlKeyStrokes
Manages keystrokes for Controls.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ControlKeyStrokes
controlKeyStrokes
(Class<?> controlIdsClass) copy()
static KeyStroke
keyStroke
(int keyCode) Creates aKeyStroke
with the given keyCode and no modifiers.static KeyStroke
keyStroke
(int keyCode, int modifiers) Creates aKeyStroke
with the given keyCode and modifiers.
-
Method Details
-
keyStroke
- Parameters:
controlId
- the control id- Returns:
- the
Value
controlling the key stroke for the given control - Throws:
IllegalArgumentException
- in case no control is associated with the given control id
-
copy
ControlKeyStrokes copy()- Returns:
- a copy of this
ControlKeyStrokes
instance
-
controlKeyStrokes
- Parameters:
controlIdsClass
- the class containing the control ids- Returns:
- a new
ControlKeyStrokes
instance
-
keyStroke
Creates aKeyStroke
with the given keyCode and no modifiers.- Parameters:
keyCode
- the key code- Returns:
- a keystroke value
- See Also:
-
keyStroke
Creates aKeyStroke
with the given keyCode and modifiers.- Parameters:
keyCode
- the key codemodifiers
- the modifiers- Returns:
- a keystroke value
- See Also:
-