Class ActionsCommandBarCreator

  • All Implemented Interfaces:
    ActionsVisitor, com.nomagic.magicdraw.ui.actions.MainActionsVisitor

    @OpenApiAll
    public abstract class ActionsCommandBarCreator
    extends java.lang.Object
    implements ActionsVisitor, com.nomagic.magicdraw.ui.actions.MainActionsVisitor
    The abstract class for creating toolbars from actions. This class provides common framework for toolbar creation, but does not implement specific methods for buttons creation.
    • Method Detail

      • acceptChildren

        protected void acceptChildren​(ActionsManager manager)
        For all categories in manager calls accept this visitor.
        Parameters:
        manager - manager from which categories will be collected.
      • addFlexibleSeparator

        protected void addFlexibleSeparator()
        Adds a flexible separator into the current toolbar. It should move other buttons to the most right/bottom position
      • addToJideSplitButton

        protected void addToJideSplitButton​(ActionsCategory category)
      • createJideSplitButton

        protected com.nomagic.awt.NMJideSplitButton createJideSplitButton​(NMAction a)
      • acceptChildren

        protected void acceptChildren​(NMAction parent)
        Calls accept for all actions in given action.
        Parameters:
        parent - container of actions.
      • createComponent

        protected javax.swing.AbstractButton createComponent​(NMAction action)
        Creates NMActionButton for given action.
        Parameters:
        action - action source for button.
        Returns:
        created button.
      • createComponent

        protected javax.swing.AbstractButton createComponent​(NMStateAction action)
        Creates MDStateActionButton from MDStateAction.
        Parameters:
        action - source for creating button.
        Returns:
        created button.
      • visit

        public void visit​(NMAction action)
        Description copied from interface: ActionsVisitor
        Visits action.
        Specified by:
        visit in interface ActionsVisitor
        Parameters:
        action - the action to visit.
      • visit

        public void visit​(SelectItemAction action)
        Specified by:
        visit in interface com.nomagic.magicdraw.ui.actions.MainActionsVisitor
      • visit

        public void visit​(com.nomagic.magicdraw.uml.symbols.actions.ChangeFontAction action)
        Specified by:
        visit in interface com.nomagic.magicdraw.ui.actions.MainActionsVisitor
      • createComponent

        protected java.awt.Component createComponent​(com.nomagic.magicdraw.uml.symbols.actions.ChangeFontAction action)
      • visit

        public void visit​(com.nomagic.magicdraw.uml.symbols.actions.ChangeZoomAction category)
        Specified by:
        visit in interface com.nomagic.magicdraw.ui.actions.MainActionsVisitor
      • createComponent

        protected java.awt.Component createComponent​(com.nomagic.magicdraw.uml.symbols.actions.ChangeZoomAction category)
      • visit

        public void visit​(PropertyAction action)
        Specified by:
        visit in interface com.nomagic.magicdraw.ui.actions.MainActionsVisitor
      • createPropertyActionComponent

        protected void createPropertyActionComponent​(PropertyAction action)
      • getIconProvider

        public com.nomagic.awt.ActionIconProvider getIconProvider()
      • setIconProvider

        public void setIconProvider​(com.nomagic.awt.ActionIconProvider iconProvider)
      • addToCurrentToolbar

        protected abstract void addToCurrentToolbar​(java.awt.Component c)