public interface ControlMap
Manages a set of
Control instances.-
Method Summary
Modifier and TypeMethodDescription<T extends Control>
is.codion.common.value.Value<T>control(ControlKey<T> controlKey) static ControlMapcontrolMap(Class<?> controlKeysClass) Collection<is.codion.common.value.Value<Control>>controls()copy()keyEvent(ControlKey<?> controlKey) Returns aKeyEvents.Builderinstance if a keyStroke and a Control is associated with the givenControlKey, otherwise an emptyOptional.is.codion.common.value.Value<KeyStroke>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<is.codion.common.value.Value<Control>> controls()- Returns:
- all available controls
-
keyStroke
- Parameters:
controlKey- the control key- Returns:
- the
Valuecontrolling the key stroke 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
-