Enum KeyBindingType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<KeyBindingType>

    public enum KeyBindingType
    extends java.lang.Enum<KeyBindingType>
    Allows clients to signal their support for the assigning of key binding shortcut keys. Most action clients need not be concerned with this class. The default settings of DockingAction work correctly for almost all cases, which is to have the action support individual key bindings, which are managed by the system via the UI.
    See Also:
    DockingActionIf
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INDIVIDUAL
      Supports the assignment of key bindings via the UI.
      SHARED
      When the key binding is set via the UI, this action, and any action that shares a name with this action, will be updated to the same key binding value whenever the key binding options change.
      UNSUPPORTED
      Indicates the setting of key bindings through the UI is not supported
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isManaged()
      A convenience method for clients to check whether this key binding type should be managed directly by the system.
      boolean isShared()
      Convenience method for checking if this type is the SHARED type
      boolean supportsKeyBindings()
      Returns true if this type supports key bindings.
      static KeyBindingType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static KeyBindingType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • UNSUPPORTED

        public static final KeyBindingType UNSUPPORTED
        Indicates the setting of key bindings through the UI is not supported
      • INDIVIDUAL

        public static final KeyBindingType INDIVIDUAL
        Supports the assignment of key bindings via the UI. Setting a key binding on an action with this type will not affect any other action.
      • SHARED

        public static final KeyBindingType SHARED
        When the key binding is set via the UI, this action, and any action that shares a name with this action, will be updated to the same key binding value whenever the key binding options change.

        Most actions will not be shared. If you are unsure if your action should use a shared keybinding, then do not do so.

    • Method Detail

      • values

        public static KeyBindingType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (KeyBindingType c : KeyBindingType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static KeyBindingType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • supportsKeyBindings

        public boolean supportsKeyBindings()
        Returns true if this type supports key bindings. This is a convenience method for checking that this type is not UNSUPPORTED.
        Returns:
        true if key bindings are supported
      • isShared

        public boolean isShared()
        Convenience method for checking if this type is the SHARED type
        Returns:
        true if shared
      • isManaged

        public boolean isManaged()
        A convenience method for clients to check whether this key binding type should be managed directly by the system.

        Shared actions are not managed directly by the system, but are instead managed through a proxy action.

        Returns:
        true if managed directly by the system; false if key binding are not supported or are managed through a proxy