Event fired whenever the current window is removed from it's previous tabset.
To find out which other windows are in the tabset, use the getTabs() method.
import {tabbing} from 'openfin-layouts';
tabbing.addEventListener('tab-removed', async (event: TabRemovedEvent) => {
console.log("Window removed from tab group");
});
If a window is moved from one tab group to another, this will be messaged as a tab-removed event, followed by a tab-added.
Event fired whenever the active tab within a tab group is changed.
import {tabbing} from 'openfin-layouts';
tabbing.addEventListener('tab-activated', (event: TabActivatedEvent) => {
const activeTab = event.detail.tabID;
console.log("Active tab:", activeTab.uuid, activeTab.name);
});
Event fired whenever a windows tab properties are updated.
The event will always contain the full properties of the tab, even if only a subset of them were updated.
import {tabbing} from 'openfin-layouts';
tabbing.addEventListener('tab-properties-updated', (event: TabPropertiesUpdatedEvent) => {
const tabID = event.detail.identity;
const properties = event.detail.properties;
console.log(`Properties for ${tabID.uuid}/${tabID.name} are:`, properties);
});
Adds current window context (or window specified in second arg) to the tab group of the target window (first arg).
The added tab will be brought into focus.
import {tabbing} from 'openfin-layouts';
// Tab self to App1.
tabbing.addTab({uuid: 'App1', name: 'App1'});
// Tab App2 to App1.
tabbing.addTab({uuid: 'App1', name: 'App1'}. {uuid: 'App2', name: 'App2'});
The identity of the window to create a tab group on.
The identity of the window to add to the tab group. If no Identity is provided as an argument the current window context will be used.
Closes the tab for the window context and removes it from its associated tab group.
import {tabbing} from 'openfin-layouts';
// Closes the current window context tab.
tabbing.closeTab();
// Closes another windows context tab.
tabbing.closeTab({uuid: 'App1', name: 'App1'});
Identity of the window context to close. If no Identity is provided as an argument the current window context will be used.
Closes the tab group for the window context.
import {tabbing} from 'openfin-layouts';
// Closes the tab group for the current window context.
tabbing.closeTabGroup();
// Closes the tab group for another windows context.
tabbing.closeTabGroup({uuid: 'App1', name: 'App1'});
Identity of the window context to close the tab group for. If no Identity is provided as an argument the current window context will be
used.
Given a set of windows, will create a tab group construct and UI around them. The bounds and positioning of the first (applicable) window in the set will be
used as the seed for the tab UI properties.
import {tabbing} from 'openfin-layouts';
tabbing.createTabGroup([{uuid: "App1", name: "App1"}, {uuid: "App2", name: "App2"}, {uuid: "App3", name: "App3"}]);
Array of windows which will be added to the new tab group.
Returns array of window identity references for tabs belonging to the tab group of the provided window context.
If no Identity is provided as an argument, the current window context will be used.
If there is no tab group associated with the window context, will resolve to null.
import {tabbing} from 'openfin-layouts';
// Gets all tabs for the current window context.
tabbing.getTabs();
// Get all tabs for another window context.
tabbing.getTabs({uuid: "sample-window-uuid", name: "sample-window-name"});
The window context, defaults to the current window.
Maximizes the tab group for the window context.
import {tabbing} from 'openfin-layouts';
// Minimizes the tab group for the current window context.
tabbing.maxmimizeTabGroup();
// Minimizes the tab group for another windows context.
tabbing.maximizeTabGroup({uuid: 'App1', name: 'App1'});
Identity of the window context to maximize the tab group for. If no Identity is provided as an argument the current window context will be
used.
Minimizes the tab group for the window context.
import {tabbing} from 'openfin-layouts';
// Minimizes the tab group for the current window context.
tabbing.minimizeTabGroup();
// Minimizes the tab group for another windows context.
tabbing.minimizeTabGroup({uuid: 'App1', name: 'App1'});
Identity of the window context to minimize the tab group for. If no Identity is provided as an argument the current window context will be
used.
Removes the specified window context from its tab group.
import {tabbing} from 'openfin-layouts';
// Remove the current context from its tab group.
tabbing.removeTab();
// Remove another window from its tab group.
tabbing.removeTab({uuid: 'App1', name: 'App1'});
Identity of the window context to remove. If no Identity is provided as an argument, the current window context will be used.
Restores the tab group for the window context to its normal state.
import {tabbing} from 'openfin-layouts';
// Restores the tab group for the current window context.
tabbing.restoreTabGroup();
// Restores the tab group for another windows context.
tabbing.restoreTabGroup({uuid: 'App1', name: 'App1'});
Identity of the window context to restore the tab group for. If no Identity is provided as an argument the current window context will be
used.
Sets the window context as the active tab in its tab group. Active tabs are brought to the front of the tab group and shown.
import {tabbing} from 'openfin-layouts'
// Sets the current window as active in the tab group.
tabbing.setActiveTab()
// Sets another window context as the active tab.
tabbing.setActiveTab({uuid: 'App1', name: 'App1'});
Identity of the window context to set as active. If no Identity is provided as an argument the current window context will be used.
Creates the custom tabstrip + configuration for the entire application. An application cannot have different windows using different tabstrip UIs.
import {tabbing} from 'openfin-layouts';
tabbing.setTabstrip({url: 'https://localhost/customTabstrip.html', height: 60});
The Application UI Configuration object.
Updates a tab's Properties on the Tab strip. This includes the tabs title and icon.
import {tabbing} from 'openfin-layouts';
// Updating only some properties for the current window context.
tabbing.updateTabProperties({title: 'An Awesome Tab!'});
// Update all properties for the current window context.
tabbing.updateTabProperties({title: 'An Awesome Tab!', icon: 'http://openfin.co/favicon.ico'});
// Update properties for another windows context.
tabbing.updateTabProperties({title: 'An Awesome Tab'}, {uuid: 'App1', name: 'App1'});
Properties object for the tab to consume.
Identity of the window context set the properties on. If no Identity is provided as an argument the current window context will be used.
Event fired whenever the current window is tabbed. This event is used when adding windows to both new and existing tabsets.
To find out which other windows are in the tabset, use the
getTabs()method.import {tabbing} from 'openfin-layouts'; tabbing.addEventListener('tab-added', async (event: TabAddedEvent) => { console.log("Window added to tab group: ", event.detail.identity); console.log("Windows in current group: ", await tabbing.getTabs()); });If a window is moved from one tab group to another, this will be messaged as a
tab-removedevent, followed by atab-added.tab-added