Class Tree

All Implemented Interfaces:
com.nomagic.awt.PopupOwner, com.nomagic.magicdraw.ui.Updatable, Cachable, Autoscroll, FocusListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
BrowserTabTree

@OpenApi public class Tree extends AbstractTree implements Autoscroll, com.nomagic.awt.PopupOwner, com.nomagic.magicdraw.ui.Updatable, Cachable
The tree used in MagicDraw browser.
See Also:
  • Method Details

    • getSelectedNode

      @CheckForNull @OpenApi public Node getSelectedNode()
      Returns first selected node in the tree.
      Returns:
      first selected node.
    • getNode

      @CheckForNull @OpenApi public Node getNode(int row)
      Returns first selected node in the tree.
      Returns:
      first selected node.
    • getSelectedNodes

      @OpenApi public Node[] getSelectedNodes()
      Returns all selected nodes in the tree.
      Returns:
      all selected nodes in the tree.
    • openNode

      @CheckForNull @OpenApi public final TreePath openNode(BaseElement object)
      Opens(expands) node for a give Element.
      Parameters:
      object - the element to expand in the tree
      Returns:
      path of opened node
    • openNode

      @CheckForNull @OpenApi public final TreePath openNode(BaseElement object, boolean requestFocus)
      Opens(expands) node for a give Element. May request focus for a tree.
      Parameters:
      object - the element to expand in the tree
      requestFocus - request focus for a tree.
      Returns:
      path of opened node
    • openNode

      @CheckForNull @OpenApi public final TreePath openNode(@CheckForNull BaseElement object, boolean select, boolean appendSelection, boolean requestFocus)
      Opens(expands) node for a give Element. May request focus for a tree.
      Parameters:
      object - the element to expand in the tree
      select - select node.
      appendSelection - append to old selection or clear old selection
      requestFocus - request focus for a tree.
      Returns:
      path of opened node
    • openNode

      @CheckForNull @OpenApi public final TreePath openNode(BaseElement object, boolean select, boolean requestFocus)
      Opens(expands) node for a give Element. May request focus for a tree.
      Parameters:
      object - the element to expand in the tree
      select - select node.
      requestFocus - request focus for a tree.
      Returns:
      path of opened node
    • openNode

      @CheckForNull @OpenApi public final TreePath openNode(@CheckForNull BaseElement object, boolean select, boolean appendSelection, boolean requestFocus, boolean scrollToVisible)
      Opens(expands) node for a give Element. May request focus for a tree.
      Parameters:
      object - the element to expand in the tree.
      select - select node.
      appendSelection - append to old selection or clear old selection
      requestFocus - request focus for a tree.
      scrollToVisible - do we need to scroll to visible?
      Returns:
      path of opened node.
    • getRootNode

      @OpenApi public Node getRootNode()
      Returns root node of the tree.
      Overrides:
      getRootNode in class AbstractTree
      Returns:
      root node.