Add a new tab with the provided name and content and additional left margin.<p>

@param tabContent the widget to add as a tab
@param tabName the name of the tab to display in the tabbar
484484
public void addWithLeftMargin(E tabContent, String tabName) {

        tabContent.addStyleName(I_CmsLayoutBundle.INSTANCE.generalCss().cornerAll());
        m_tabPanel.add(tabContent, CmsDomUtil.stripHtml(tabName));

        int tabIndex = m_tabPanel.getWidgetIndex(tabContent);
        Element tabElement = getTabElement(tabIndex);
        if (tabElement != null) {
            tabElement.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().tabLeftMargin());
            if (!m_panelStyle.equals(CmsTabbedPanelStyle.classicTabs)) {
                tabElement.addClassName(I_CmsLayoutBundle.INSTANCE.generalCss().buttonCornerAll());
                tabElement.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().borderAll());
            }
        }
        m_tabPanel.checkTabOverflow();
    }
1008726
void setSourceTab(String title, @CheckForNull BugInstance bug) {
        JComponent label = mainFrame.getGuiLayout().getSourceViewComponent();
        if (label != null) {
            removeLink(label);
        }
        mainFrame.getGuiLayout().setSourceTitle(title);
    }
250424
public void setContentPane(Container contentPanel) {
        if (contentPanel == null) {
            throw new IllegalArgumentException("Content pane can't be null");
        }

        if (wrapper != null) {
            super.remove(wrapper);
        }
        wrapper = new WrapperContainer(contentPanel);
        super.addImpl(wrapper, BorderLayout.CENTER, -1);
    }
706459
function(tab) {
            var tabCount = this.get('tabs').length,
                index = this.getTabIndex(tab);

            if ( tab === this.get(ACTIVE_TAB) ) { 
                if (tabCount > 1) { // select another tab
                    if (index + 1 === tabCount) { // if last, activate previous
                        this.set(ACTIVE_INDEX, index - 1);
                    } else { // activate next tab
                        this.set(ACTIVE_INDEX, index + 1);
                    }
                } else { // no more tabs
                    this.set(ACTIVE_TAB, null);
                }
            }
            
            this._removeTabEvents(tab);
            this._tabParent.removeChild( tab.get(ELEMENT) );
            this._contentParent.removeChild( tab.get(CONTENT_EL) );
            this._configs.tabs.value.splice(index, 1);

            tab.fireEvent('remove', { type: 'remove', tabview: this });
        }
1212434
def rename_client_tab(self, client, given_name):
        """"""
        index = self.get_client_index_from_id(id(client))

        if given_name is not None:
            client.given_name = given_name
        self.tabwidget.setTabText(index, client.get_name())
809887
function( contentItem ) {
		for( var i = 0; i < this.tabs.length; i++ ) {
			this.tabs[ i ].setActive( this.tabs[ i ].contentItem === contentItem );
		}

		this._updateTabSizes();
	}
469498
def insert_tab index, title, config={}, &block
      @tabs.insert(index, Tab.new(title, self, config, &block) )
    end
963297
void addContentDefinition(CmsContentDefinition definition) {

        m_definitions.put(definition.getLocale(), definition);
        m_contentLocales.add(definition.getLocale());
    }
750449
def insertTab(self, index, tab):
        
        if not isinstance(tab, XViewPanelItem):
            tab = XViewPanelItem(tab, self)
            tab.setFixedHeight(self.height())

        # remove it from the layout first
        self.layout().insertWidget(index, tab)
        self.setCurrentIndex(index)
        return tab
156335
private String tabConfig() {
    StringBuilder builder = new StringBuilder();
    builder.append("<div type='config' class='content_detail'>");
    builder.append(proxy.getConfig().toString("<p>%1$s: %2$s</p>"));
    builder.append("</div>");
    return builder.toString();
  }
62556
function (tab) {
                var self = this, bar = self.get('bar'), body = self.get('body');
                bar.set('selectedTab', tab);
                body.set('selectedPanelIndex', util.indexOf(tab, bar.get('children')));
                return this;
            }
11750
private void showTab() {
		if (parentTab != null) {
			tab = parentTab.getTab(this);
			if (tab != null) {
				// FIXME: this should be added by the constructor or by the panel that adds this
				// tab
				// tab.getComponent().addStyleName("example-queries-tab");
				tab.setEnabled(true);

				if (!(parentTab.getSelectedTab() instanceof ResultViewPanel)) {
					parentTab.setSelectedTab(tab);
				}
			}
		}

	}
1025779
public void addTab(final WComponent card, final String name) {
		WContainer titledCard = new WContainer();
		WText title = new WText("<b>[" + name + "]:</b><br/>");
		title.setEncodeText(false);
		titledCard.add(title);
		titledCard.add(card);

		deck.add(titledCard);

		final TabButton button = new TabButton(name, titledCard);

		button.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				deck.makeVisible(button.getAssociatedCard());
			}
		});

		btnPanel.add(button);
	}
849835
def tabText(self, tab):
        
        if not isinstance(tab, int):
            tab = self.indexOf(tab)
        return super(FwTabWidget, self).tabText(tab)
833349
function( contentItem ) {
		var i, j, isActive, activeTab;

		if (this.activeContentItem === contentItem) return;
		
		for( i = 0; i < this.tabs.length; i++ ) {
			isActive = this.tabs[ i ].contentItem === contentItem;
			this.tabs[ i ].setActive( isActive );
			if( isActive === true ) {
				this.activeContentItem = contentItem;
				this.parent.config.activeItemIndex = i;
			}
		}

		if (this.layoutManager.config.settings.reorderOnTabMenuClick) {
			/**
			 * If the tab selected was in the dropdown, move everything down one to make way for this one to be the first.
			 * This will make sure the most used tabs stay visible.
			 */
			if (this._lastVisibleTabIndex !== -1 && this.parent.config.activeItemIndex > this._lastVisibleTabIndex) {
				activeTab = this.tabs[this.parent.config.activeItemIndex];
				for ( j = this.parent.config.activeItemIndex; j > 0; j-- ) {
					this.tabs[j] = this.tabs[j - 1];
				}
				this.tabs[0]                       = activeTab;
				this.parent.config.activeItemIndex = 0;
			}
		}

		this._updateTabSizes();
		this.parent.emitBubblingEvent( 'stateChanged' );
	}
1232065
function( contentItem, index ) {
		var tab = new lm.controls.Tab( this, contentItem );
		
		if( this.tabs.length === 0 ) {
			this.tabs.push( tab );
			this.tabsContainer.append( tab.element );
			return;
		}
	
		if( index === undefined ) {
			index = this.tabs.length;
		}
	
		if( index > 0 ) {
			this.tabs[ index - 1 ].element.after( tab.element );
		} else {
			this.tabs[ 0 ].element.before( tab.element );
		}
	
		this.tabs.splice( index, 0, tab );
	}
450357
function(tabName){
    if (this.spreadsheet.activeTab === tabName){
      return;
    }
    switch(tabName) {
      case 'graph':
        D.hide(this.spreadsheet.container);
        D.removeClass(this.spreadsheet.tabs.data, 'selected');
        D.addClass(this.spreadsheet.tabs.graph, 'selected');
      break;
      case 'data':
        if (!this.spreadsheet.datagrid)
          this.spreadsheet.constructDataGrid();
        D.show(this.spreadsheet.container);
        D.addClass(this.spreadsheet.tabs.data, 'selected');
        D.removeClass(this.spreadsheet.tabs.graph, 'selected');
      break;
      default:
        throw 'Illegal tab name: ' + tabName;
    }
    this.spreadsheet.activeTab = tabName;
  }