Module is.codion.swing.common.ui
Interface ControlKeyStrokes
public interface ControlKeyStrokes
Manages keystrokes for Controls.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ControlKeyStrokescontrolKeyStrokes(Class<?> controlIdsClass) copy()static KeyStrokekeyStroke(int keyCode) Creates aKeyStrokewith the given keyCode and no modifiers.static KeyStrokekeyStroke(int keyCode, int modifiers) Creates aKeyStrokewith the given keyCode and modifiers.is.codion.common.value.Value<KeyStroke>
-
Method Details
-
keyStroke
- Parameters:
controlId- the control id- Returns:
- the
Valuecontrolling 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
ControlKeyStrokesinstance
-
controlKeyStrokes
- Parameters:
controlIdsClass- the class containing the control ids- Returns:
- a new
ControlKeyStrokesinstance
-
keyStroke
Creates aKeyStrokewith the given keyCode and no modifiers.- Parameters:
keyCode- the key code- Returns:
- a keystroke value
- See Also:
-
keyStroke
Creates aKeyStrokewith the given keyCode and modifiers.- Parameters:
keyCode- the key codemodifiers- the modifiers- Returns:
- a keystroke value
- See Also:
-