Class ActionsCommandBarCreator

java.lang.Object
com.nomagic.actions.ActionsCommandBarCreator
All Implemented Interfaces:
ActionsVisitor, com.nomagic.magicdraw.ui.actions.MainActionsVisitor

@OpenApiAll public abstract class ActionsCommandBarCreator extends 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.
  • Field Details

    • currentToolbar

      @CheckForNull protected JComponent currentToolbar
      The toolbar to add buttons into during the visit actions.
  • Constructor Details

  • Method Details

    • 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 AbstractButton createComponent(NMAction action)
      Creates NMActionButton for given action.
      Parameters:
      action - action source for button.
      Returns:
      created button.
    • createComponent

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

      protected AbstractButton createComponent(NMTriStateAction action)
      Creates MDStateActionButton from MDTriStateAction.
      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(NMStateAction action)
      Description copied from interface: ActionsVisitor
      Visits NMStateAction.
      Specified by:
      visit in interface ActionsVisitor
      Parameters:
      action - the action to visit.
    • visit

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

      public abstract void visit(ActionsCategory category)
      Description copied from interface: ActionsVisitor
      Visits ActionsCategory.
      Specified by:
      visit in interface ActionsVisitor
      Parameters:
      category - the category 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 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 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(Component c)