public interface ControlMap
Manages a set of
Control
instances.-
Method Summary
Modifier and TypeMethodDescriptioncontrol
(ControlKey<T> controlKey) static ControlMap
controlMap
(Class<?> controlKeysClass) controls()
copy()
keyEvent
(ControlKey<?> controlKey) Returns aKeyEvents.Builder
instance if a keyStroke and a Control is associated with the givenControlKey
, otherwise an emptyOptional
.keyStroke
(ControlKey<?> controlKey)
-
Method Details
-
control
- Type Parameters:
T
- the control type- Parameters:
controlKey
- the control key- Returns:
- the
Value
specifying theControl
associated with the given key - Throws:
IllegalArgumentException
- in case no control is associated with the given key
-
controls
Collection<Value<Control>> controls()- Returns:
- all available controls
-
keyStroke
- Parameters:
controlKey
- the control key- Returns:
- the
Value
controlling the key stroke for the given control - Throws:
IllegalArgumentException
- in case no control is associated with the given control key
-
keyEvent
Returns aKeyEvents.Builder
instance if a keyStroke and a Control is associated with the givenControlKey
, otherwise an emptyOptional
.- Parameters:
controlKey
- the key identifying the control- Returns:
- a key event builder for the given control
-
copy
ControlMap copy()- Returns:
- a copy of this
ControlMap
instance
-
controlMap
- Parameters:
controlKeysClass
- the class containing the control keys- Returns:
- a new
ControlMap
initialized with control keys found in the given class
-