Interface ControlMap


public interface ControlMap
Manages a set of Control instances.
  • Method Details

    • control

      <T extends Control> Value<T> control(ControlKey<T> controlKey)
      Type Parameters:
      T - the control type
      Parameters:
      controlKey - the control key
      Returns:
      the Value specifying the Control 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

      Value<KeyStroke> keyStroke(ControlKey<?> controlKey)
      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

      Optional<KeyEvents.Builder> keyEvent(ControlKey<?> controlKey)
      Returns a KeyEvents.Builder instance if a keyStroke and a Control is associated with the given ControlKey, otherwise an empty Optional.
      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

      static ControlMap controlMap(Class<?> controlKeysClass)
      Parameters:
      controlKeysClass - the class containing the control keys
      Returns:
      a new ControlMap initialized with control keys found in the given class