@OpenApi
public class Browser
extends java.lang.Object
implements com.nomagic.magicdraw.help.HelpSource
Sample of accessing Swing JTree of containment tree:
getContainmentTree().getTree()
Modifier and Type | Class and Description |
---|---|
static interface |
Browser.BrowserInitializer
Browser initializer is an extension point for browser creation.
|
Modifier and Type | Method and Description |
---|---|
static void |
addBrowserInitializer(Browser.BrowserInitializer initializer)
Add new new browser initializer.
|
void |
addPanel(ExtendedPanel panel)
Adds a new browser panel.Should be called during browser initialization only.
|
void |
addPanel(ExtendedPanel panel,
int index)
Adds a new browser panel.Should be called during browser initialization only.
|
BrowserTabTree |
addTree(BrowserTabTree tree,
boolean drag,
boolean drop)
Adds and does setup a new tree to the browser.
|
BrowserTabTree |
addTree(BrowserTabTree tree,
boolean drag,
boolean drop,
int index)
Adds and does setup a new tree to the browser.
|
BrowserTabTree |
getActiveTree()
Returns reference to the active tree.
|
ContainmentTree |
getContainmentTree()
Returns containment tree.
|
DiagramsTree |
getDiagramsTree()
Returns diagrams tree.
|
ExtensionsTree |
getExtensionsTree()
Returns extensions tree.
|
ExtensionsTree |
getExtensionsTree(boolean addIfNotExists)
Returns extensions tree.
|
InheritanceTree |
getInheritanceTree()
Returns inheritance tree.
|
InheritanceTree |
getInheritanceTree(boolean addIfNotExists)
Returns inheritance tree.
|
LockViewTree |
getLockViewTree()
Returns Lock view tree.
|
java.util.List<ExtendedPanel> |
getPanels() |
SearchResultsTree |
getSearchResultsTree()
Returns last active or newly added search results tree.
|
SearchResultsTree |
getSearchResultsTree(boolean addIfNotExists)
Returns last active or newly added search results tree.
|
java.util.List<BrowserTabTree> |
getTrees() |
static void |
removeBrowserInitializer(Browser.BrowserInitializer initializer)
Remove browser initializer.
|
void |
removePanel(ExtendedPanel panel)
Removes browser panel.
|
void |
removeTree(BrowserTabTree tree)
Removes a tree from the browser.Should be called during browser initialization only.
|
void |
removeTree(BrowserTabTree tree,
boolean saveLayout)
Removes a tree from the browser.Should be called during browser initialization only.
|
@OpenApi public void addPanel(ExtendedPanel panel)
panel
- panelBrowser.BrowserInitializer
@OpenApi public void addPanel(ExtendedPanel panel, int index)
panel
- panelindex
- indexBrowser.BrowserInitializer
@OpenApi public void removePanel(ExtendedPanel panel)
panel
- panelBrowser.BrowserInitializer
@OpenApi public BrowserTabTree addTree(BrowserTabTree tree, boolean drag, boolean drop)
tree
- a new treedrag
- tree should be a drag operation sourcedrop
- tree should be a drop operation sourceBrowser.BrowserInitializer
@OpenApi public BrowserTabTree addTree(@Nonnull BrowserTabTree tree, boolean drag, boolean drop, int index)
tree
- a new treedrag
- tree should be a drag operation sourcedrop
- tree should be a drop operation sourceindex
- the position of new tree among other treesBrowser.BrowserInitializer
@OpenApi public void removeTree(BrowserTabTree tree)
tree
- a new treeBrowser.BrowserInitializer
@OpenApi public void removeTree(BrowserTabTree tree, boolean saveLayout)
tree
- a new treesaveLayout
- save information about existing trees into project optionsBrowser.BrowserInitializer
@CheckForNull @OpenApi public BrowserTabTree getActiveTree()
@OpenApi @CheckForNull public InheritanceTree getInheritanceTree()
@OpenApi @CheckForNull public InheritanceTree getInheritanceTree(boolean addIfNotExists)
addIfNotExists
- add tree if not exists and it is allowed to have inheritance tree@OpenApi public LockViewTree getLockViewTree()
@OpenApi public ContainmentTree getContainmentTree()
@OpenApi public DiagramsTree getDiagramsTree()
@OpenApi @CheckForNull public ExtensionsTree getExtensionsTree()
@OpenApi @CheckForNull public ExtensionsTree getExtensionsTree(boolean addIfNotExists)
addIfNotExists
- add tree if not exists and it is allowed to have extension tree@OpenApi public SearchResultsTree getSearchResultsTree()
@CheckForNull @OpenApi public SearchResultsTree getSearchResultsTree(boolean addIfNotExists)
addIfNotExists
- add search result tree if it does not exist@OpenApi public java.util.List<BrowserTabTree> getTrees()
@OpenApi public java.util.List<ExtendedPanel> getPanels()
@OpenApi public static void addBrowserInitializer(Browser.BrowserInitializer initializer)
initializer
- initializer@OpenApi public static void removeBrowserInitializer(Browser.BrowserInitializer initializer)
initializer
- initializer