Class ErdTabsManager

    • Constructor Detail

      • ErdTabsManager

        public ErdTabsManager​(ErdEditor editor,
                              org.eclipse.swt.widgets.Composite parent)
        Constuctor.
        Parameters:
        editor - - editor to create manager for. Can't be null.
        parent - - parent to locate tab folter. Can't be null.
    • Method Detail

      • getActiveTab

        public DiagramTabItem getActiveTab()
        Returns active tab. If there is no active tab, returns null.
        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 be null.
        projectNames - - new tab's project names. Can be null.
        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 be null.
        projectNames - - new tabs project names. Can be null.
        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 be null.
      • 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 be null.
      • refreshTabStyles

        public void refreshTabStyles​(DiagramTabItem tab)
        Refreshes given tab connections lines styles. Loads styles from preference store.
        Parameters:
        tab - - tab to refresh. Can't be null.
      • isFullEditor

        public boolean isFullEditor()
        Returns true if editor is full (not granular).
        Returns:
        true if editor is full (not granular).