Class DefaultDiagramAction

    • Constructor Detail

      • DefaultDiagramAction

        public DefaultDiagramAction​(@CheckForNull
                                    java.lang.String actionID,
                                    @CheckForNull
                                    java.lang.String actionName,
                                    @CheckForNull
                                    javax.swing.KeyStroke stroke,
                                    @CheckForNull
                                    java.lang.String group)
        Constructs new action.
        Parameters:
        actionID - the action ID
        actionName - the action name
        stroke - the action stroke
        group - the action group
      • DefaultDiagramAction

        public DefaultDiagramAction​(@CheckForNull
                                    java.lang.String actionID,
                                    @CheckForNull
                                    java.lang.String actionName,
                                    @CheckForNull
                                    javax.swing.KeyStroke stroke,
                                    @CheckForNull
                                    java.lang.String group,
                                    boolean useSchema)
        Constructs new action.
        Parameters:
        actionID - the action ID
        actionName - the action name
        stroke - the action stroke
        group - the action group
    • 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.
        Returns:
        set diagram
      • getFirstSelected

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

        protected java.util.List<PresentationElement> getSelected()
        Returns list of selected presentation elements.
        Returns:
        list of selected presentation elements. If no elements selected, empty list is returned.