Class MDMenuAction

  • All Implemented Interfaces:
    com.nomagic.actions.ShortcutsNotCustomizable, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener, javax.swing.Action, javax.swing.event.MenuListener, javax.swing.event.PopupMenuListener

    @OpenApiAll
    public class MDMenuAction
    extends MenuAction
    implements com.nomagic.actions.ShortcutsNotCustomizable
    This class represents special kind of action. It can behave as normal actions category, but has methods which informs action about menu selecting or deselecting.
    See Also:
    Serialized Form
    • Constructor Detail

      • MDMenuAction

        public MDMenuAction​(@CheckForNull
                            java.lang.String id,
                            java.lang.String name,
                            @CheckForNull
                            javax.swing.KeyStroke stroke,
                            @CheckForNull
                            java.lang.String group)
        Constructs the action with given id, name, keystroke and group.
        Parameters:
        id - the id of the action.
        name - the name of the action.
        stroke - the key stroke of the action
        group - the name of the related commands group.
      • MDMenuAction

        public MDMenuAction​(@CheckForNull
                            java.lang.String id,
                            java.lang.String name,
                            int mnemonic,
                            java.lang.String group)
        Constructs the action with given id, name, mnemonic key and group.
        Parameters:
        id - the id of the action.
        name - the name of the action.
        mnemonic - the mnemonic key of the action
        group - the name of the related commands group.
    • Method Detail

      • updateState

        public void updateState()
        If action has assigned relative group, takes enable flag value from this group and sets to itself.
        Overrides:
        updateState in class NMAction