Class DefaultAbstractDiagramStateAction

All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction, com.nomagic.magicdraw.actions.ShortcutSchemaAction, ActionListener, Serializable, Cloneable, Comparable, EventListener, Action
Direct Known Subclasses:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.BaseAbstractDiagramAction, DefaultDiagramStateAction

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

    • DefaultAbstractDiagramStateAction

      public DefaultAbstractDiagramStateAction(@CheckForNull 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.
    • DefaultAbstractDiagramStateAction

      public DefaultAbstractDiagramStateAction(@CheckForNull 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 AbstractDiagramPresentationElement diagram)
      Sets diagram for this action.
      Specified by:
      setDiagram in interface com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
      Parameters:
      diagram - the given diagram.
    • getDiagram

      @CheckForNull protected AbstractDiagramPresentationElement getDiagram()
      Returns diagram this action. MagicDraw framework guarantee that diagram will set if this method is called from updateState() or actionPerformed(ActionEvent) methods.
      Returns:
      diagram.
    • getFirstSelected

      @CheckForNull protected PresentationElement getFirstSelected()
      Returns first selected in the diagram.
      Returns:
      first selected
    • getSelected

      protected List<PresentationElement> getSelected()
      Returns list of selection in the diagram.
      Returns:
      list of selection in the diagram