Interface BaseAction

    • Method Detail

      • setName

        void setName​(String value)
        Sets the name of the action, i.e., the menuitem/button caption.
        Parameters:
        value - the name
      • getName

        String getName()
        Returns the name of the action, i.e., the menuitem/button caption.
        Returns:
        the name
      • setIcon

        void setIcon​(Icon value)
        Sets the icon of the action, i.e., the menuitem/button icon. Sets SMALL_ICON and LARGE_ICON_KEY at the same time.
        Parameters:
        value - the icon
      • getIcon

        Icon getIcon()
        Returns the icon the action (stored under SMALL_ICON).
        Returns:
        the icon
      • setSelected

        void setSelected​(boolean value)
        Sets the name of the action, i.e., the menuitem/button caption.
        Parameters:
        value - the name
      • isSelected

        boolean isSelected()
        Returns the name of the action, i.e., the menuitem/button caption.
        Returns:
        the name
      • setMnemonic

        void setMnemonic​(int value)
        Sets the mnemonic to use for the action.
        Parameters:
        value - the mnemonic, e.g., KeyEvent.VK_O
        See Also:
        KeyEvent
      • hasMnemonic

        boolean hasMnemonic()
        Checks whether a mnemonic is available for this action.
        Returns:
        true if a mnemonic is available
      • getMnemonic

        KeyStroke getMnemonic()
        Returns the mnemonic in use for the action.
        Returns:
        the mnemonic if available (e.g., KeyEvent.VK_O), otherwise null
        See Also:
        hasMnemonic()
      • setAccelerator

        void setAccelerator​(String value)
        Sets the accelerator (KeyStroke) to use for the action.
        Parameters:
        value - the keystroke, e.g., "ctrl pressed O"
        See Also:
        KeyStroke.getKeyStroke(String)
      • hasAccelerator

        boolean hasAccelerator()
        Checks whether a keystroke is available for this action.
        Returns:
        true if a keystroke is available
      • getAccelerator

        KeyStroke getAccelerator()
        Returns the accelerator (KeyStroke) in use for the action.
        Returns:
        the keystroke if available, otherwise null
        See Also:
        hasAccelerator()
      • setToolTipText

        void setToolTipText​(String value)
        Sets the TipText to use for the action, i.e., button.
        Parameters:
        value - the tip text
      • hasToolTipText

        boolean hasToolTipText()
        Checks whether a tip text is available for this action.
        Returns:
        true if a tip text is available
      • getToolTipText

        String getToolTipText()
        Returns the TipText in use for the action.
        Returns:
        the tip text if available, otherwise null
        See Also:
        hasToolTipText()
      • setAsynchronous

        void setAsynchronous​(boolean value)
        Sets whether to launch the menu item asynchronously using a swingworker.
        Parameters:
        value - true if asynchronous
      • isAsynchronous

        boolean isAsynchronous()
        Returns whether to launch the menu item asynchronously using a swingworker.
        Returns:
        true if asynchronous
      • cleanUp

        void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler