Class DefaultActiveDiagramAction

  • All Implemented Interfaces:
    com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction, 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

    @OpenApiAll
    public class DefaultActiveDiagramAction
    extends DefaultDiagramAction
    Action is used for the actions shared in diagram and application environments When getting diagram, if there are no diagram applied to the action - returns active diagram
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultActiveDiagramAction

        public DefaultActiveDiagramAction​(@CheckForNull
                                          java.lang.String actionID,
                                          @CheckForNull
                                          java.lang.String actionName,
                                          @CheckForNull
                                          javax.swing.KeyStroke stroke,
                                          @CheckForNull
                                          java.lang.String group)
      • DefaultActiveDiagramAction

        public DefaultActiveDiagramAction​(@CheckForNull
                                          java.lang.String actionID,
                                          @CheckForNull
                                          java.lang.String actionName,
                                          @CheckForNull
                                          javax.swing.KeyStroke stroke,
                                          @CheckForNull
                                          java.lang.String group,
                                          boolean useSchema)
    • Method Detail

      • getDiagram

        @CheckForNull
        public DiagramPresentationElement getDiagram()
        Returns diagram of this action. MagicDraw framework guarantee that diagram will set if this method is called from updateState() or actionPerformed(ActionEvent) methods.
        Overrides:
        getDiagram in class DefaultDiagramAction
        Returns:
        set diagram