Package docking

Class DockingKeyBindingAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
    Direct Known Subclasses:
    MultipleKeyAction

    public class DockingKeyBindingAction
    extends javax.swing.AbstractAction
    A class that can be used as an interface for using actions associated with keybindings. This class is meant to only by used by internal Ghidra key event processing.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.KeyStroke keyStroke  
      protected DockingWindowManager winMgr  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Field Detail

      • keyStroke

        protected javax.swing.KeyStroke keyStroke
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface javax.swing.Action
        Overrides:
        isEnabled in class javax.swing.AbstractAction
      • isReservedKeybindingPrecedence

        public boolean isReservedKeybindingPrecedence()
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
      • parseKeyStroke

        public static java.lang.String parseKeyStroke​(javax.swing.KeyStroke keyStroke)
        Convert the toString() form of the keyStroke.
        In Java 1.4.2 & earlier, Ctrl-M is returned as "keyCode CtrlM-P" and we want it to look like: "Ctrl-M".
        In Java 1.5.0, Ctrl-M is returned as "ctrl pressed M" and we want it to look like: "Ctrl-M".
      • parseKeyStroke

        public static javax.swing.KeyStroke parseKeyStroke​(java.lang.String keyStroke)
        Parses the given text into a KeyStroke. This method relies upon KeyStroke.getKeyStroke(String) for parsing. Before making that call, this method will perform fixup on the given text for added flexibility. For example, the given text may contain spaces or dashes as the separators between parts in the string. Also, the text is converted such that it is not case-sensitive. So, the following example formats are allowed:
            Alt-F
            alt p
            Ctrl-Alt-Z
            ctrl Z
         
        Parameters:
        keyStroke -
        Returns: