public interface ControlMap
Manages a set of
Control instances.-
Method Summary
Modifier and TypeMethodDescriptioncontrol(ControlKey<T> controlKey) static ControlMapcontrolMap(Class<?> controlKeysClass) controls()copy()keyEvent(ControlKey<?> controlKey) Returns aKeyEvents.Builderinstance 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
Valuespecifying theControlassociated 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
Valuecontrolling the keyStroke for the given control - Throws:
IllegalArgumentException- in case no control is associated with the given control key
-
keyEvent
Returns aKeyEvents.Builderinstance 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
ControlMapinstance
-
controlMap
- Parameters:
controlKeysClass- the class containing the control keys- Returns:
- a new
ControlMapinitialized with control keys found in the given class
-