Class DefaultBrowserStateAction

  • All Implemented Interfaces:
    BrowserAction, 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 DefaultBrowserStateAction
    extends MDStateAction
    implements BrowserAction
    The default implementation of BrowserAction and MDStateAction.
    See Also:
    Serialized Form
    • Field Detail

      • mTree

        private Tree mTree
        The browser of this action.
    • Constructor Detail

      • DefaultBrowserStateAction

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

      • setTree

        public void setTree​(Tree tree)
        Set tree for this action.
        Specified by:
        setTree in interface BrowserAction
        Parameters:
        tree - the browser for this action.
      • getTree

        public Tree getTree()
        Return tree of this action. MagicDraw framework guarantee that tree will set if this method is called from updateState() or actionPerformed(ActionEvent) methods.
        Returns:
        tree of this action.