Class ShortcutPluginExecuteKeyListener

    • Constructor Detail

      • ShortcutPluginExecuteKeyListener

        public ShortcutPluginExecuteKeyListener​(WorkbenchContext wbc)
    • Method Detail

      • add

        public void add​(int keyCode,
                        int modifiers,
                        PlugIn plugin,
                        EnableCheck enableCheck)
        Deprecated.
        Legacy method. Use add(KeyStroke key, final PlugIn plugin) instead.
        Parameters:
        keyCode - code of the shortcut key
        modifiers - modifier to use with the key
        plugin - PlugIn associated with the shortcut
        enableCheck - enableCheck defining whether the PlugIn is active or not
      • contains

        public boolean contains​(KeyStroke key)
      • containsDefinition

        public boolean containsDefinition​(KeyStroke key)
      • getAllKeyStrokes

        public final Set<KeyStroke> getAllKeyStrokes()
      • getPlatformKeyStroke

        public static KeyStroke getPlatformKeyStroke​(KeyStroke stroke)
        create a proper keystroke per platform. used to decorate menus with accelerators.
        Parameters:
        stroke - keyStroke to modify
        Returns:
        a KeyStroke which modifier has been modified according to the platform