Class PanelTabset

    • Constructor Detail

      • PanelTabset

        public PanelTabset()
        default constructor initialises the editviews.
    • Method Detail

      • setPresentationName

        public void setPresentationName​(String presentationName)
        set the presentationName for this tabset
        Parameters:
        presentationName - may be either PanelTabset.LEVEL1_HORIZONTAL, PanelTabset.LEVEL1_VERTICAL, PanelTabset.LEVEL2_HORIZONTAL or PanelTabset.LEVEL2_VERTICAL
      • getPresentationName

        public String getPresentationName()
        set the presentationName from this tabset
        Returns:
        presentationName
      • getPanelTabs

        public PanelTab[] getPanelTabs()
        Returns collection containing all accessible and inaccessible tabs that are shown always of the tabset.
        Returns:
        collection containing all accessible and inaccessible tabs that are shown always of the tabset
      • getNumberOfTabs

        public int getNumberOfTabs()
        returns the number of tabs in this tabset.
        Returns:
        the number of tabs in this tabset
      • addPanelTab

        public void addPanelTab​(PanelTab panelTab)
        Adds a panelTab to the collection of tab this set is holding.
        Parameters:
        panelTab - panelTab to add
      • getPanelViewCommandForSelectedTab

        protected PanelTabFBO getPanelViewCommandForSelectedTab()
        returns the panelViewCommand for the currently active tab if the active (main) tab doesn't have a panelViewCommand, the panelViewCommand of the underlaying currently active subTab is returned.
        Returns:
        panelViewCommand for the requested tabid
      • setSelectedTabById

        public boolean setSelectedTabById​(String tabId)
        Sets the currently active tab to the given tabId. incase a tabId of a subtab is provided, the maintab of the active subTab is also set to active
        Parameters:
        tabId - tabId of the tab to be set active (main or sub-tab)
        Returns:
        true if the provided tabId was in this tabset (or underliying tabsets)
      • getSelectedTabId

        public String getSelectedTabId()
        Return the id of the selected (sub)tab.
        Returns:
        the id of the selected (sub)tab
      • getSelectedTab

        public PanelTab getSelectedTab()
        returns the current active tab within this tabset. if no tabId was set active, the first tab of this set is assumed to be active
        Returns:
        the current active tab in this tabset null is tis set is empty
      • findPanelTab

        public PanelTab findPanelTab​(String tabId)
        retuens the panelTab with the provided tabId. seach is performen within this tabset and the sub-tabsets
        Parameters:
        tabId - tabId
        Returns:
        panelTab with the provided tabId null if not found
      • findPanelViewCommand

        public PanelTabFBO findPanelViewCommand​(String tabId)
        returns the panelview command for the tab with the givven tabId (f found) if the a tab woth the given Id is found, but doesn;t have a panelCiewCommand the panelViewCommand of the cerruntly selected subTab is returned (if exists).
        Parameters:
        tabId - tabId
        Returns:
        PanelViewCommand for the panelTab with the provided tabId (if null for the tab with the given id, panelViewCommand for of the subTab is returned) null if tabId is not found
      • getNextTab

        public PanelTab getNextTab()
        Returns the next tab after the current tab that can be used. If no tab after the current tab can be used the current tab is returned.
        Returns:
        the next tab after the current tab that can be used. If no tab after the current tab can be used the current tab is returned
      • getFirstTabFromIndex

        public PanelTab getFirstTabFromIndex​(int index,
                                             boolean ascending)
        Returns the first tab that can be found from the given index that can be used, returns null if no tab can be found.
        Parameters:
        index - Index from which is searched
        ascending - Search direction
        Returns:
        the first tab that can be found from the given index that can be used, returns null if no tab can be found
      • getPreviousTab

        public PanelTab getPreviousTab()
        Returns the first tab before the current tab that can be used. If no tab before the current tab can be used the current tab is returned.
        Returns:
        the first tab before the current tab that can be used. If no tab before the current tab can be used the current tab is returned
      • isFirstTabSelected

        public boolean isFirstTabSelected()
        return true if the first tab of this tabset is selected (can be by default).
        Returns:
        true if the first tab of this tabset is selected
      • isLastTabSelected

        public boolean isLastTabSelected()
        return true if the last tab of this tabset is selected (can be by default).
        Returns:
        true if the last tab of this tabset is selected
      • makePanelTab

        public PanelTab makePanelTab​(String tabId,
                                     String titleKey,
                                     String viewFileName,
                                     String titleImage,
                                     DelegatedController controller,
                                     javax.servlet.http.HttpServletRequest request)
        creates a configured new PanelTab instance.
        Parameters:
        tabId - unique tabId in this panale configuration
        titleKey - resourcebundle key for the tab title
        viewFileName - viewname for this tab, may be null
        titleImage - TitleImage of the tab, not shown if null
        panelViewCommandClass - command for this tab, may be null
        Returns:
        the configured PanelTab instance null in case of configuration errors