Class MDActionsCategory

  • All Implemented Interfaces:
    com.nomagic.magicdraw.actions.ShortcutSchemaAction, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener, javax.swing.Action
    Direct Known Subclasses:
    DiagramInnerToolbarConfiguration

    @OpenApiAll
    public class MDActionsCategory
    extends ActionsCategory
    implements com.nomagic.magicdraw.actions.ShortcutSchemaAction
    The class describes the actions category used in MagicDraw. This category uses ActionsGroupController for checking enabled/disable state of assigned relative actions group(if it has some group).
    See Also:
    Serialized Form
    • Constructor Detail

      • MDActionsCategory

        public MDActionsCategory()
        Creates actions category with no name
      • MDActionsCategory

        public MDActionsCategory​(@CheckForNull
                                 java.lang.String id,
                                 @CheckForNull
                                 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 KeyStroke of the action
        group - the name of the related commands group
      • MDActionsCategory

        public MDActionsCategory​(@CheckForNull
                                 java.lang.String id,
                                 @CheckForNull
                                 java.lang.String name,
                                 @CheckForNull
                                 javax.swing.KeyStroke stroke,
                                 @CheckForNull
                                 java.lang.String group,
                                 boolean useShortcutSchema)
        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
        useShortcutSchema - use shortcuts schema
      • MDActionsCategory

        public MDActionsCategory​(@CheckForNull
                                 java.lang.String id,
                                 @CheckForNull
                                 java.lang.String name,
                                 int mnemonic,
                                 @CheckForNull
                                 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
      • MDActionsCategory

        public MDActionsCategory​(@CheckForNull
                                 java.lang.String id,
                                 @CheckForNull
                                 java.lang.String name,
                                 int mnemonic)
        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 - mnemonic char
      • MDActionsCategory

        public MDActionsCategory​(@CheckForNull
                                 java.lang.String id,
                                 @CheckForNull
                                 java.lang.String name)
        Constructs the action with given id, name, mnemonic key and group.
        Parameters:
        id - the id of the action
        name - the name of the action
    • 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
      • isUseShortcutSchema

        public boolean isUseShortcutSchema()
        Specified by:
        isUseShortcutSchema in interface com.nomagic.magicdraw.actions.ShortcutSchemaAction