Class DefaultDiagramStateAction

java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.BaseNMStateAction
com.nomagic.actions.NMStateAction
com.nomagic.magicdraw.actions.MDStateAction
com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramStateAction
com.nomagic.magicdraw.ui.actions.DefaultDiagramStateAction
All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction, DiagramAction, com.nomagic.magicdraw.actions.ShortcutSchemaAction, ActionListener, Serializable, Cloneable, Comparable, EventListener, Action

@OpenApiAll public class DefaultDiagramStateAction extends com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramStateAction implements DiagramAction
The default implementation of DiagramAction and MDStateAction
See Also:
  • Constructor Details

    • DefaultDiagramStateAction

      public DefaultDiagramStateAction(String actionID, @CheckForNull String actionName, @CheckForNull KeyStroke stroke, @CheckForNull String group)
      Constructs new action.
      Parameters:
      actionID - the action ID.
      actionName - the action name.
      stroke - the action stroke.
      group - the action group.
    • DefaultDiagramStateAction

      public DefaultDiagramStateAction(String actionID, @CheckForNull String actionName, @CheckForNull KeyStroke stroke, @CheckForNull String group, boolean useSchema)
      Constructs new action.
      Parameters:
      actionID - the action ID.
      actionName - the action name.
      stroke - the action stroke.
      group - the action group.
      useSchema - use shortcuts schema
  • Method Details

    • setDiagram

      public void setDiagram(@CheckForNull DiagramPresentationElement diagram)
      Sets diagram for this action.
      Specified by:
      setDiagram in interface DiagramAction
      Parameters:
      diagram - the given diagram
    • setDiagram

      public final void setDiagram(@CheckForNull AbstractDiagramPresentationElement diagram)
      Sets the diagram to this action. Only @DiagramPresentationElement are supported.
      Specified by:
      setDiagram in interface com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
      Overrides:
      setDiagram in class com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramStateAction
      Parameters:
      diagram - the given diagram
    • getDiagram

      @CheckForNull protected DiagramPresentationElement getDiagram()
      Description copied from class: com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramStateAction
      Returns diagram this action. MagicDraw framework guarantee that diagram will set if this method is called from updateState() or actionPerformed(ActionEvent) methods.
      Overrides:
      getDiagram in class com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramStateAction
      Returns:
      diagram.