Class BaseCustomizableDiagramAction

  • All Implemented Interfaces:
    DiagramAction, 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:
    DrawShapeDiagramAction

    @OpenApiAll
    public class BaseCustomizableDiagramAction
    extends com.nomagic.magicdraw.ui.actions.BaseDiagramAction
    Action which can be customized in custom diagram descriptor UI.
    See Also:
    Serialized Form
    • Field Detail

      • customAdditionalDrawAction

        protected com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction customAdditionalDrawAction
    • Constructor Detail

      • BaseCustomizableDiagramAction

        public BaseCustomizableDiagramAction​(java.lang.String actionID,
                                             @CheckForNull
                                             java.lang.String actionName,
                                             @CheckForNull
                                             javax.swing.KeyStroke key)
    • Method Detail

      • getIcons

        public com.nomagic.magicdraw.ui.diagrams.IconCollection getIcons()
      • setIcons

        public void setIcons​(com.nomagic.magicdraw.ui.diagrams.IconCollection icons)
      • getLargeIcon

        @CheckForNull
        public javax.swing.Icon getLargeIcon()
        Description copied from class: NMAction
        Returns the large icon of the action.
        Overrides:
        getLargeIcon in class NMAction
        Returns:
        the large icon of the action.
      • getSmallIcon

        @CheckForNull
        public javax.swing.Icon getSmallIcon()
        Description copied from class: NMAction
        Returns the small icon of the action.
        Overrides:
        getSmallIcon in class NMAction
        Returns:
        the small icon of the action.
      • getDefaultIcon

        @CheckForNull
        protected ResizableIcon getDefaultIcon()
      • setDescription

        public void setDescription​(java.lang.String description)
        Description copied from class: NMAction
        Sets new action description.
        Overrides:
        setDescription in class NMAction
        Parameters:
        description - action description.
      • clone

        public BaseCustomizableDiagramAction clone()
        Description copied from class: NMAction
        Clones the object. Does the deep clone.
        Overrides:
        clone in class com.nomagic.magicdraw.ui.actions.BaseDiagramAction
        Returns:
        cloned object
      • setStyle

        public void setStyle​(@CheckForNull
                             com.nomagic.magicdraw.ui.diagrams.PropertyManagerProxy style)
      • createState

        @NotApi
        protected com.nomagic.magicdraw.ui.states.State createState()
        Creates ShapeDrawState and sets to to the canvas.
        Overrides:
        createState in class com.nomagic.magicdraw.ui.actions.BaseDiagramAction
      • getCustomAdditionalDrawAction

        public com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction getCustomAdditionalDrawAction()
        Returns custom additional draw action for this action.
        Returns:
        additional draw action
      • getDefaultAdditionalDrawAction

        @CheckForNull
        public com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction getDefaultAdditionalDrawAction()
        Returns default additional draw action for this action
        Returns:
        default additional draw action
      • setCustomAdditionalDrawAction

        public void setCustomAdditionalDrawAction​(com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction customAdditionalDrawAction)
        Set custom additional draw action for this action. This draw action will be used if not null.
        Parameters:
        customAdditionalDrawAction - custom additional draw action