Class BrowserTabTree

All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.EditActionExecutorsOwner, com.nomagic.awt.PopupOwner, com.nomagic.magicdraw.ui.Activatable, WindowComponent, com.nomagic.magicdraw.ui.Updatable, Cachable, Autoscroll, FocusListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
ContainmentTree, DiagramsTree, ExtensionsTree, InheritanceTree, LockViewTree, SearchResultsTree

@OpenApi public abstract class BrowserTabTree extends Tree implements WindowComponent, com.nomagic.magicdraw.ui.Activatable, com.dassault_systemes.modeler.magic.ui.EditActionExecutorsOwner
The base class for all trees added into Browser top tab.
See Also:
  • Constructor Details

    • BrowserTabTree

      public BrowserTabTree(com.nomagic.magicdraw.ui.browser.BrowserTabTreeParams params)
  • Method Details

    • disposeAll

      public void disposeAll()
    • configureToolbarActions

      protected abstract void configureToolbarActions(ActionsManager manager)
    • initTree

      public void initTree()
      Initializes the tree. Root nodes will be created here.
    • getActions

      protected ActionsManager getActions()
      Returns shortcuts action manager for this browser.
      Overrides:
      getActions in class Tree
      Returns:
      ActionsManager with actions to register in this browser as KeyListeners
    • activate

      public final void activate()
      Activates the tree. If tree was not initialized, initializes it.
      Specified by:
      activate in interface com.nomagic.magicdraw.ui.Activatable
    • activate

      public final void activate(boolean activateNotShowing)
      Activates the tree. If tree was not initialized, initializes it.
      Parameters:
      activateNotShowing - indicates if tree should be activated if it is not showing
    • specificActivate

      protected void specificActivate()
    • doBeforeOpenNode

      public final void doBeforeOpenNode()
      Overrides:
      doBeforeOpenNode in class Tree
    • addDropListener

      public void addDropListener()
    • addDragListener

      public void addDragListener()
    • getParams

      public com.nomagic.magicdraw.ui.browser.BrowserTabTreeParams getParams()
      Overrides:
      getParams in class Tree
    • getBrowser

      public Browser getBrowser()
      Returns reference to a browser.
      Returns:
      a browser.
    • setNeedsInit

      public void setNeedsInit(boolean needsInit)
      Sets needs init flag.
      Parameters:
      needsInit - if this flag is true, tree will be initialized on activation.
    • resetTabTree

      protected void resetTabTree()
    • isNeedsInit

      public boolean isNeedsInit()
    • sortNodes

      public void sortNodes()
      Sorts all nodes in this tree.
    • showPopupMenu

      public void showPopupMenu(@CheckForNull MouseEvent e)
      Shows context menu.
      Specified by:
      showPopupMenu in interface com.nomagic.awt.PopupOwner
      Overrides:
      showPopupMenu in class Tree
      Parameters:
      e - the source mouse event. May be null.
    • createContextMenuActionManager

      public ActionsManager createContextMenuActionManager(MouseEvent e)
    • configureContextActions

      protected abstract void configureContextActions(ActionsManager manager)
      Configures context menu actions.
      Parameters:
      manager - a manager with context menu actions to configure.
    • createToolbar

      protected void createToolbar(ActionsManager manager)
    • getInfo

      public final com.nomagic.magicdraw.ui.browser.BrowserComponentInfo getInfo()
      Description copied from interface: WindowComponent
      Returns an information about this window component.
      Specified by:
      getInfo in interface WindowComponent
      Returns:
      window component information.
    • getContent

      public WindowComponentContent getContent()
      Description copied from interface: WindowComponent
      Returns a contents of this window component.
      Specified by:
      getContent in interface WindowComponent
      Returns:
      window component contents.
    • setBrowserTreeGroup

      public void setBrowserTreeGroup(String browserTreeGroup)
    • getBrowserTreeGroup

      public String getBrowserTreeGroup()
    • findTreePathFor

      @CheckForNull public TreePath findTreePathFor(BaseElement data)
    • getProject

      public Project getProject()
      Description copied from interface: com.nomagic.magicdraw.ui.Activatable
      Project of activatable component
      Specified by:
      getProject in interface com.nomagic.magicdraw.ui.Activatable
      Returns:
      project
    • editNodeByElement

      public boolean editNodeByElement(BaseElement element)
      Searches for the node representing element and invokes rename for the node
      Returns:
      true if the node is found else false
    • getEditActionExecutorsProvider

      public com.dassault_systemes.modeler.magic.ui.actions.EditActionExecutorsProvider getEditActionExecutorsProvider()
      Specified by:
      getEditActionExecutorsProvider in interface com.dassault_systemes.modeler.magic.ui.EditActionExecutorsOwner