Package de.xima.fc.gui.model.designer
Class TabViewModel
- java.lang.Object
-
- de.xima.fc.gui.model.designer.TabViewModel
-
- All Implemented Interfaces:
Serializable
public final class TabViewModel extends Object implements Serializable
POJO model holding the data for managing the individual tabs of the new designer.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TabViewModel
empty()
String
getActiveTab()
Map<String,TabModel>
getAvailableTabs()
List<String>
getTabMenuItems()
void
setActiveTab(String activeTab)
static TabViewModel
withTabs(List<TabModel> tabs)
-
-
-
Constructor Detail
-
TabViewModel
public TabViewModel(Map<String,TabModel> availableTabs, List<String> tabMenuItems, String activeTab)
New POJO with the given data.- Parameters:
availableTabs
- Value returned bygetAvailableTabs()
tabMenuItems
- Value returned bygetTabMenuItems()
activeTab
- Value returned bygetActiveTab()
-
-
Method Detail
-
getActiveTab
public String getActiveTab()
- Returns:
- ID of the tab that is currently active (displayed).
-
getAvailableTabs
public Map<String,TabModel> getAvailableTabs()
- Returns:
- Tabs that are available, whether or not they are currently shown in the UI. Map between the
TabModel.getId()
and the tab itself.
-
getTabMenuItems
public List<String> getTabMenuItems()
- Returns:
- A list of tabs shown in the tab menu in the top header bar.
-
setActiveTab
public void setActiveTab(String activeTab)
- Parameters:
activeTab
- ID of the tab that is currently active (displayed).
-
withTabs
public static TabViewModel withTabs(List<TabModel> tabs)
- Parameters:
tabs
- All available tabs.- Returns:
- A new tab view model with all available tabs. The list of tab entries is set to the given tabs, the active tab is set to the first tab.
-
empty
public static TabViewModel empty()
- Returns:
- A new empty model with no available tabs and not selected tab.
-
-