Class ErdTabsManager
- java.lang.Object
-
- com._1c.g5.v8.dt.erd.ui.editors.support.ErdTabsManager
-
-
Constructor Summary
Constructors Constructor Description ErdTabsManager(ErdEditor editor, org.eclipse.swt.widgets.Composite parent)
Constuctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeTab(int index)
Closes tab with given index.void
closeTab(DiagramTabItem tabToClose)
Closes given tab.DiagramTabItem
createNewTab(String tabName, Collection<String> projectNames)
Creates new tab with given tab name and project name.DiagramTabItem
createNewTab(String tabName, Collection<String> projectNames, int tabIndex)
Creates new tab with given tab name and project name at given position.void
dispose()
Disposes of this manager.DiagramTabItem
getActiveTab()
Returns active tab.Collection<DiagramTabItem>
getDiagramTabItems()
Returns diagram tab items.boolean
isFullEditor()
Returnstrue
if editor is full (not granular).void
refreshTabColors(DiagramTabItem tab)
Refreshes given tab figures colors.void
refreshTabStyles(DiagramTabItem tab)
Refreshes given tab connections lines styles.void
resetTabs()
Reset tabs (Closes all tabs and opens one empty tab).
-
-
-
Constructor Detail
-
ErdTabsManager
public ErdTabsManager(ErdEditor editor, org.eclipse.swt.widgets.Composite parent)
Constuctor.- Parameters:
editor
- - editor to create manager for. Can't benull
.parent
- - parent to locate tab folter. Can't benull
.
-
-
Method Detail
-
getActiveTab
public DiagramTabItem getActiveTab()
Returns active tab. If there is no active tab, returnsnull
.- Returns:
- active tab. Can return
null
.
-
getDiagramTabItems
public Collection<DiagramTabItem> getDiagramTabItems()
Returns diagram tab items.- Returns:
- diagram tab items. Can't return
null
.
-
dispose
public void dispose()
Disposes of this manager.
-
createNewTab
public DiagramTabItem createNewTab(String tabName, Collection<String> projectNames)
Creates new tab with given tab name and project name.- Parameters:
tabName
- - new tab's name. Can benull
.projectNames
- - new tab's project names. Can benull
.- Returns:
- opened tab. Can't return
null
.
-
createNewTab
public DiagramTabItem createNewTab(String tabName, Collection<String> projectNames, int tabIndex)
Creates new tab with given tab name and project name at given position.- Parameters:
tabName
- - new tabs name. Can benull
.projectNames
- - new tabs project names. Can benull
.tabIndex
- - the zero-relative index of created tab. The item will be added to the end of the items if given index is negative- Returns:
- opened tab. Can't return
null
.
-
closeTab
public void closeTab(int index)
Closes tab with given index.- Parameters:
index
- - index of tab to close.
-
closeTab
public void closeTab(DiagramTabItem tabToClose)
Closes given tab.- Parameters:
tabToClose
- - tab to close. Can't benull
.
-
resetTabs
public void resetTabs()
Reset tabs (Closes all tabs and opens one empty tab).
-
refreshTabColors
public void refreshTabColors(DiagramTabItem tab)
Refreshes given tab figures colors. Loads colors from preference store.- Parameters:
tab
- - tab to refresh. Can't benull
.
-
refreshTabStyles
public void refreshTabStyles(DiagramTabItem tab)
Refreshes given tab connections lines styles. Loads styles from preference store.- Parameters:
tab
- - tab to refresh. Can't benull
.
-
isFullEditor
public boolean isFullEditor()
Returnstrue
if editor is full (not granular).- Returns:
true
if editor is full (not granular).
-
-