Class AbstractKeyboardAction

    • Field Detail

      • m_Name

        protected String m_Name
        the name of the action.
      • m_Shortcut

        protected BaseShortcut m_Shortcut
        the shortcut.
    • Constructor Detail

      • AbstractKeyboardAction

        public AbstractKeyboardAction()
    • Method Detail

      • getDefaultName

        protected String getDefaultName()
        Returns the default name of the action.
        Returns:
        the default
      • setName

        public void setName​(String value)
        Sets the name of the action.
        Parameters:
        value - the name
      • getName

        public String getName()
        Returns the name of the action.
        Returns:
        the name
      • nameTipText

        public String nameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getDefaultShortcut

        protected abstract BaseShortcut getDefaultShortcut()
        Returns the default shortcut of the action.
        Returns:
        the default
      • setShortcut

        public void setShortcut​(BaseShortcut value)
        Sets the shortcut of the action.
        Parameters:
        value - the shortcut
      • getShortcut

        public BaseShortcut getShortcut()
        Returns the shortcut of the action.
        Returns:
        the shortcut
      • shortcutTipText

        public String shortcutTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • check

        protected String check​(StateContainer state)
        Checks whether the current state is suitable.
        Default implementation only ensures that a state has been provided.
        Parameters:
        state - the current state
        Returns:
        null if OK, otherwise error message
      • doExecute

        protected abstract String doExecute​(StateContainer state)
        Performs the actual execution of the action.
        Parameters:
        state - the current state
        Returns:
        null if OK, otherwise error message
      • postExecute

        protected void postExecute​(StateContainer state,
                                   boolean success)
        Performs post-execution operations.
        Default implementation returns the focus to the flow tree.
        Parameters:
        state - the current state
        success - whether the execution was successful
      • execute

        public String execute​(StateContainer state)
        Executes the action.
        Parameters:
        state - the current state
        Returns:
        null if OK, otherwise error message